Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is really two questions:</p> <ul> <li>Should you use sn.exe to generate your keypairs?</li> <li>Should you use a private key to encrypt data?</li> </ul> <p>The answer to the first question is: no, not really. SN.exe's keypair generation is really only useful for very small development environments, and requires you to handle ALL security. There are much better ways to generate certificate containers that include things like password protection (PFX). Take a look at the MakeCert tool, for example - it can be used to generate self-signed X.509 certificates that can be used for pretty much all cryptographic operations you may want to perform.</p> <p>Unfortunately, the answer to the second question is also: no, not really. From a crypto standpoint, there's not much point to encrypting something with the private key; after all, the public key is just that: public. If anyone can decrypt it (No OS provides any protection of public keys, so it's trivial to get a copy), there's not much point in encrypting it. If the intent is to ensure that people can prove it's from you, a digital signature is a better way to go, and in such a case, what you describe is exactly what you'd want to do: sign it with the private key, verify the signature with the freely available public key.</p> <p>Now, if your intent is to have a way to distribute encrypted data to multiple recipients, consider using a PKCS #7/CMS envelope. Since you're talking about using sn.exe, that tells me you're using .NET, so you're in luck! The EnvelopedCms class should provide what you need. All you need are your recipients' public keys from their X.509 certificates (makecert to the rescue!). MSDN has a walkthrough <a href="http://msdn.microsoft.com/en-us/library/bb924547%28VS.90%29.aspx" rel="nofollow">here</a>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload