zoukankan      html  css  js  c++  java
  • private key and public key

    You can however sign with the private key and verify the signature with the public key.

    While the math involve makes sense when the key roles are reversed (and this is how signatures work), encrypting for privacy doesn't make much sense when the decryption key is well know and public.


    If you want to protect against generation of licences by someone else, you ought to be signing, not encrypting.  Encryption prevents against reading of data by third parties, and signing prevents against writing of data by third parties.  If you encrypt with your private key, you won't be protecting against reading of your data by third parties since there's no reason to believe that your intended public key recipients won't share (intentionally or otherwise) the key with anyone else.


    bad key issue:
    Ok, found what the issue is: needed to tell makecert 1) that's certificate's subject key type is for "Exchange" 2) to mark private key as exportable

    so makecert call looks like

    makecert.exe Test.cer -r -n "CN=Test Subject" -sr LocalMachine -ss My -sky Exchang




    cert cannot be found:
    don't use x64 command to make cert

    return certificate.PublicKey.Key as RSACryptoServiceProvider;

    return certificate.PrivateKey as RSACryptoServiceProvider;

  • 相关阅读:
    NOIp199Cantor表
    NOIP2001数的计算
    NOIP2010排队接水
    普及组2006第三题jam的计数法
    2013提高组积木大赛
    洛谷1223排队接水
    9.3noip模拟赛第一题卡片
    2002普及组第四题过河卒
    细胞分裂(NOIP2009 普及组第三题)
    道路游戏(NOIP2009 普及组第四题)
  • 原文地址:https://www.cnblogs.com/lwzz/p/2293269.html
Copyright © 2011-2022 走看看