cryptography

记一次内存泄漏DUMP分析

荒凉一梦 提交于 2020-08-05 18:31:11
自从进入一家创业公司以后,逐渐忙成狗,却无所收获,感觉自身的技术能力用武之地很少,工作生活都在业务逻辑中颠倒。 前些天线上服务内存吃紧,让运维把DUMP拿下来,分析一下聊以自慰。 先来统计一下大对象信息 0:000> !dumpheap -min 85000 -stat Statistics: MT Count TotalSize Class Name 000007feec34c168 7 57734750 System.Char[] 000007feec34aee0 14 115469904 System.String 00000000013032d0 101 621925414 Free Total 122 objects Fragmented blocks larger than 0.5 MB: Addr Size Followed by 000000010d382018 2.8MB 000000010d645e90 System.String 000000010d971aa8 1.8MB 000000010db43530 System.Random 000000010db70bd0 1.1MB 000000010dc8e238 System.String 000000010dd2f6a8 0.7MB 000000010ddd9160 System.Random

上天近4年,墨子号有“意外收获”:潘建伟团队首次完成千公里级量子密钥分发,卫星量子通信规模化可期

二次信任 提交于 2020-08-05 15:26:52
  距离 2016 年 8 月 16 日 “墨子号” 发射已经过去 3 年 10 个月。这颗卫星仍在距离地球 500 公里的轨道上作业。    这个服役时间已经超出团队的预想。更不用提 2017 年~ 2019 年期间,基于墨子号的几项重大成果,4 度登上 Nature、Science。   现在,“墨子号”又完成了一项新的挑战: 首次实现了 1120 km 基于纠缠的量子密钥分发(Quantum Key Distribution,QKD) 。    该成果由中国科学技术大学潘建伟团队领衔完成, 论文 “基于纠缠的千公里级安全量子加密(Entanglement-based secure quantum cryptography over 1,120 kilometres)” 现已在 Nature 在线发表[1]。      图丨此次论文(来源:Nature)   据介绍,该实验成果不仅将以往地面无中继量子保密通信的 空间距离提高了一个数量级 ,并且通过物理原理,确保了即使在卫星被他方控制的极端情况下依然能实现 安全的量子通信 。   Nature 杂志审稿人评价该工作,称其“展示了一项开创性实验的结果, 是朝向构建全球化量子密钥分发网络甚至量子互联网的重要一步”。   众所周知,“墨子号”是中国第一颗,也是世界第一颗上天的量子科学实验卫星,这次验证了基于卫星的 QKD 可以在距离

Error unprotecting the session cookie.The payload was invalid.

吃可爱长大的小学妹 提交于 2020-08-05 11:04:26
.Net Core 3.0 warn: Microsoft.AspNetCore.Session.SessionMiddleware[ 7 ] Error unprotecting the session cookie. System.Security.Cryptography.CryptographicException: The payload was invalid. at Microsoft.AspNetCore.DataProtection.Cng.CbcAuthenticatedEncryptor.DecryptImpl(Byte * pbCiphertext, UInt32 cbCiphertext, Byte* pbAdditionalAuthenticatedData, UInt32 cbAdditionalAuthenticatedData) at Microsoft.AspNetCore.DataProtection.Cng.Internal.CngAuthenticatedEncryptorBase.Decrypt(ArraySegment` 1 ciphertext, ArraySegment` 1 additionalAuthenticatedData) at Microsoft.AspNetCore.DataProtection

shiro框架了解

我的未来我决定 提交于 2020-07-28 10:38:36
shiro框架 1.shiro简介 Apache Shiro是Java的一个安全框架。功能强大,使用简单的Java安全框架,它为开发人员提供一个直观而全面的 认证,授权,加密 及 会话管理 的解决方案 2.shiro组成 Authentication :身份认证/登录,验证用户是不是拥有相应的身份; Authorization :授权,即权限验证,验证某个已认证的用户是否拥有某个权限; Session Manager :会话管理,即用户登录后就是一次会话,在没有退出之前,它的所有信息都在会话中; Cryptography :加密,保护数据的安全性,如密码加密存储到数据库,而不是明文存储; 3.shiro结构 3.1shiro外部结构 Subject :主体 SecurityManager :安全管理器 Realm :域 流程: 1、应用代码通过Subject来进行认证和授权,而Subject又委托给SecurityManager; 2、我们需要给Shiro的SecurityManager注入Realm,从而让SecurityManager能得到合法的用户及其 权限进行判断。 3.1shiro内部结构 Subject :主体 SecurityManager :相当于SpringMVC中的DispatcherServlet,它管理着所有Subject、且负责进行认证和授权、及会话

Custom CNG KSP and Logon domain

你离开我真会死。 提交于 2020-07-23 07:39:59
问题 I'm implementing the program related to logon domain with certificate by custom KSP and my credential provider. I have successfully interacted from my credential provider to custom KSP. I'm in the process of implementing custom KSP. The steps I perform handling in custom KSP are as follows: Install the template certificate Kerberos that has been issued from ADCS to local machine store. This is step how I Issue certificates and set up logons. Is there something missing ? Export the private key

Custom CNG KSP and Logon domain

假装没事ソ 提交于 2020-07-23 07:38:08
问题 I'm implementing the program related to logon domain with certificate by custom KSP and my credential provider. I have successfully interacted from my credential provider to custom KSP. I'm in the process of implementing custom KSP. The steps I perform handling in custom KSP are as follows: Install the template certificate Kerberos that has been issued from ADCS to local machine store. This is step how I Issue certificates and set up logons. Is there something missing ? Export the private key

Custom CNG KSP and Logon domain

血红的双手。 提交于 2020-07-23 07:37:11
问题 I'm implementing the program related to logon domain with certificate by custom KSP and my credential provider. I have successfully interacted from my credential provider to custom KSP. I'm in the process of implementing custom KSP. The steps I perform handling in custom KSP are as follows: Install the template certificate Kerberos that has been issued from ADCS to local machine store. This is step how I Issue certificates and set up logons. Is there something missing ? Export the private key

Java p12 Generation from a existing keys

谁说胖子不能爱 提交于 2020-07-20 04:00:50
问题 I'm writing a program in Java that generates RSA keys using Crt parameters. I'm able to export the key in a .pem file, but I need to export it in a pkcs12 file. How can I do that in Java? 回答1: Java contains native support for PKCS#12 key stores through KeyStore.getInstance("PKCS12") . However, generally the key stores require you to offer a matching private key / certificate pair. Just providing a public key instead of a certificate is not enough. You must create a certificate, for instance a

RSA encryption using Microsoft Excel

こ雲淡風輕ζ 提交于 2020-07-09 07:13:48
问题 Is there any ready to use implementation of RSA encryption algorithm for Excel( just encrypt a plain text using given public key, nothing else ) ? Or I need to implement it from the beginning ? I Google but found nothing useful. Any useful links is welcome. UPDATE: I need a non-commercial library. 回答1: This site Simple RSA Encryption and this site have some example code for both VBA and .NET 来源: https://stackoverflow.com/questions/13500280/rsa-encryption-using-microsoft-excel

RSA encryption using Microsoft Excel

老子叫甜甜 提交于 2020-07-09 07:13:20
问题 Is there any ready to use implementation of RSA encryption algorithm for Excel( just encrypt a plain text using given public key, nothing else ) ? Or I need to implement it from the beginning ? I Google but found nothing useful. Any useful links is welcome. UPDATE: I need a non-commercial library. 回答1: This site Simple RSA Encryption and this site have some example code for both VBA and .NET 来源: https://stackoverflow.com/questions/13500280/rsa-encryption-using-microsoft-excel