Asymmetric encryption solves the trust problem inherent in symmetric encryption by using two different keys: a public key for encrypting messages, and a private key for decrypting messages. This makes it possible to communicate in secrecy with people you don't fully trust. RSA is a cryptosystem for public-key encryption, and is widely used for securing sensitive data.
I checked the dotnetnuke source but I don't know dotnetnuke uses RSA for asymmetric encryption or not?
It would be very helpful if someone could explain asymmetric encryption method in dotnetnuke.
Thanks.
DotNetNuke doesn't use any asymmetric cryptography by itself. It uses some hash functions like MD5 (bad) and SHA-256 as well as symmetric encryption like two-key 3DES (very bad) and AES.
The only thing is that you can configure to use transport security (SSL/TLS) which includes various types of asymmetric cryptography. In SSL/TLS, client and server can negotiate a cipher suite depending on both their capabilities. You need a private key and a certificate (which contains the signed public key) in order for the connection between client and server to be encrypted.
Related
I am developing a document sharing application that allows users to send files securely. Currently, I encrypt documents on the server side using encryption (key, IV), then encrypt the key and IV with the recipient's public key. However, I want the encryption to be client-side to avoid man-in-the-middle attacks.
I am aware that storing all the information (public key, private key, IV, etc.) on the server side can make my application vulnerable to a data breach, so I am looking for an end-to-end encryption solution.
I am new to this and was wondering if there are any libraries or security protocols I could use to implement this end-to-end encryption method.
What would be the best approaches to implement end-to-end encryption for my application? Are there any specific libraries or security protocols that I could use to enhance the security of my application?
Thank you in advance for your help and advice.
I need to make a secure chat server with end-to-end encryption support, theoretically I know how it works but I don't know how to send an encryption key over ssl.
You should use a proven key exchange algorithm such as Diffie–Hellman.
Otherwise you can rely on asymmetric keys to then exchange a new/temporary symmetric key. For example, each side sends half of a symmetric key which is encrypted with each-others' public key.
I am a student and I want to implement Identity based encryption by using c#.
Example: I want to encrypt a message by using receivers email address(Public Key) and sender will send this message to receiver. Once receiver receives this encrypted message, he will decry-pt this message by using his private key.
This looks okay theoretically, but I am struggling to do this practically.
I don't know
how to encrypt a message by using receivers email address
how receiver will decry-pt encrypted message?
how receiver will get his private key?
I am expecting help from this platform, as I already spent a lot of time on searching this.
What I have tried:
I tried encryption and decryption by using RSA algorithm, but the problem here is RSA generates his own public and private key pair. And I can not use receivers email address as a public key to encrypt message.
Thank you in advance.
Ashok
You can generate secure symmetric keys from an email address, any string for that matter, with a key derivation function such as PBKDF2 (aka Rfc2898DeriveBytes).
RSA is asymmetric encryption with separate keys for encryption and decryption, symmetric encryption such as AES uses one key for both encryption and decryption.
Asymmetric encryption such as RSA has the advantage of two keys where the encryption key can be publicly known. But it is very slow and the data size, the keys are large (2048-bits is a currently secure size) and the data length is limited to the key size, it is generally used to encrypt symmetric keys. There is no control over symmetric key pair creation other than length. Use asymmetric encryption only when a public/private key pair must be used.
Asymmetric encryption such as AES is fast, has smaller keys with 128-bits common and secure and can handle data of essentially any length.
I am reading SSL security logic articles. I am confused a bit. Server has private key and server sends client public key. An encrypted data with public key only can be decrypted by private key.
1- Client side has not a private key. How does client solve the server data?
2- if public key sending over internet, somebody can Access the key who listened the network.
3- encrypt and decrypt should have an algorithm. Do all browsers knows that algorithm? if browser companies knows that encrypt algorithm, this is a security problem.
The public and private keys aren't used for data encryption in SSL. They are only used in the authentication phase. That's why the client doesn't need a private key, unless the server requires client authentication. The actual encryption is done via symmetric encryption using a negotiated session key.
There are resources on the Internet that state otherwise, notoriously the Linux Documentation Project page. They are wrong. The normative reference is RFC 2246.
Your remark about knowing the encryption algorithm is quite incorrect. First, the client has to know the algorithm to be able to encrypt and decrypt. Second, it was established many years ago that security-by-obscurity simply does not work. True cryptographic security comes from well-designed and well-tested algorithms, however well-known they may be, and key length.
I'm currently developing a system to transmit data between client and server, and was wondering what the strength of the encryption I planned to use was.
My thought was to have a private/public RSA key pair and hand out the public key to each client (leaving the private key solely on the server). Each client would then generate their own AES key and RSA encrypt it. They would then AES encrypt their data and send the encrypted data and encrypted AES key to the server. The server would then decrypt the AES key using the private key, and then decrypt the data using the AES key.
Are there any security flaws I am missing and/or is there a better way to do this?
This is almost exactly how SSL/TLS works (check out the handshake section). The only thing to make it stronger is to generate the AES key for each connection, rather than using the same key each time. You might also want to digitally sign messages that go back and forth to avoid man-in-the-middle and other spoofing attacks.
Generally speaking, creating a good cryptosystem is very difficult. When possible, you should always favor an existing (trusted) application to help out. In this case, you might consider sending your messages using HTTPS, rather than creating your own system.
You should give us more information about the language and platform you are using, so that we can give you specific recommendations about libraries that already exist and wich will handle the details for you. Using cryptographic primitives directly is not trivial and difficult to get exactly right, and with cryptography, you have to be "not exactly right" only once for your security to be broken.
To answer your question, it's generally a better idea to create a session secret (the AES key) through a Diffie-Hellman exchange, and each side use its private RSA key to sign its key-exchange data.
Otherwise, if the session secret is not established through a DH exchange, an adversary that gains access to the private RSA key (which has to be stored somewhere) could decrypt all traffic that was ever sent between the client and server.
If the secret is established through a DH exchange, then only the authentication part of the protocol would be exposed. Although an adversary in possession of the private RSA key would then not be able to read any previous communication, he still could either enter an authenticated dialog with the client/server or launch a man-in-the-middle attack (which may or may not be easily done, depending on the network).
One vulnerability would be if an attacker substituted their public key for the "real" public key. Then they would be able to intercept traffic as a "man-in-the-middle."
Protocols like S/MIME, PGP, and TLS use RSA encryption to transport keys just as you propose. However, the public keys they use are in certificates signed by trusted authorities.
The integrity of these trusted authorities must be carefully protected. For example, they might be burned into a tamper-proof hardware token, or a MAC might be computed over them using a password.
I'm not sure your approach will protect anything! You're going to keep the private key on the server and the public key will be distributed. If I get a hold of your public key, I'll be able to interact with your server at will. I think you should reverse the key ownership; each client will hold it's-own private key and the server will have a list of public keys (ala SSH). The server will have to add 'authorized' public keys and only to holders of the private keys will be able to connect.
Hope this helps.