Asymmetric Cryptography
References:
- 11.5 RSA
- 12 Digital Signatures
Setting of Public Key Encryption
Public key techniques enable parties to communicate privately without having agreed on any secret information in advance.
Public key encryption is asymmetric. One party generates a pair of keys called the public key and the secret key. Public key is used to encrypt the message and secret key is used to decrypt the cipher text.
This encryption scheme removes the need for key exchange.
The main disadvantage of public-key encryption is that it is roughly 2x to 3x orders of magnitude slower the private key encryption. Thus, when private key encryption is an option then typically it should be used.
Syntax of Public Key Encryption:
| takes as input the security parameter and outputs a pair of keys | |
| takes as input a public key of the receiver and a message and outputs a cipher text | |
| takes as input a private key and a cipher text and outputs a message or a special symbol denoting failure |
Security Discussion
Security against CPA:
If a public key encryption scheme has indistinguishable encryptions in the presence of an eavesdropper then the scheme is CPA secure
Multiple Encryptions:
If public key encryption scheme is CPA-secure then it also has indistinguishable multiple encryptions.
an immediate consequence of this is that a CPA-secure public key encryption scheme for fixed length messages implies a public key encryption scheme for arbitrary length messages satisfying the same notion of security.
Security against CCA:
Broadly speaking, in the public key setting there are two classes of chosen ciphertext attacks:
- might send a modified ciphertext to on behalf of . Although it is unlikely that would be able to obtain the entire decryption of , it might still be possible for to obtain some information about based on the subsequent behaviour of .
- might send a modified ciphertext to in its own name and might obtain the entire decryption for .
Impossibility of perfectly secret public key encryption:
In contrast to the private key setting, perfectly secret public key encryption is impossible.
Hybrid Encryption and KEM/DEM paradigms:
Public key cryptography is 2 to 3 times slower than private key encryption schemes. Is it possible to do better by using private key encryption in tandem with public key encryption schemes.
This improves efficiency because private key encryption is faster and improves bandwidth because private key schemes have lower ciphertext expansion.
The basic idea is to use a public key encryption to obtain a shared key and then encrypt the message using a private key encryption scheme and key
The sender would share the key by
- Choosing a uniform value
- encrypting using a public key encryption scheme A more direct approach is to use a public key primitive called KEM - key encapsulation mechanism to accomplish both in a single step.
KEM has three algorithms:
| Takes as input a security parameter and outputs a public-private key pair | |
| Takes as input a public key and the security parameter . It outputs a cipher text and a key | |
| takes as input a private key and a ciphertext , and outputs a key or a special symbol denoting failure. |
Any public-key encryption scheme trivially gives a KEM by choosing a random key and encrypting it.
RSA
The Factoring Assumption:
Let be polynomial time algorithm that on input outputs such that and and are both n-bit primes.
Factoring experiment
- Run to obtain .
- is given , and outputs .
- The output of the experiment is defined to be if , and otherwise.
RSA Assumption
The factoring problem has been studied for hundreds of years without an efficient algorithm being found.
This has motivated a search for other problems whose difficulty is related to the hardness of factoring.
RSA experiment:
- Run to obtain .
- Choose a uniform .
- is given and outputs .
- The output of the experiment is defined to be if , and otherwise.
in the above experiment to find , the adversary must know . then,
So how can an adversary calculate ?
- We know for to hold
- an adversary knows .
- Calculating for a vary large composite number should be expensive
- But if i am able to obtain prime factorization of into and then
- However, the prime factorization is difficult as discsussed in Factoring Assumption
Plain RSA:
Plain RSA Encryption:
Let be as in the text. Define a public-key encryption scheme as follows:
: on input run to obtain . The public key is and the private key is .
: on input a public key and a message , compute the ciphertext
: on input a private key and a ciphertext , compute the message
Digital Signatures
Integrity and Authenticity in the public-key setting is provided using digital signature schemes.
Signature schemes allow a signer who has established a public key to “sign” a message using the associated private key in such a way that anyone who knows (and knows that this public key was established by ) can verify that the message originated from and was not modified in transit.
Comparison to MACs:
Both message authentication codes and digital signature schemes are used to ensure the authenticity of transmitted message. However, there are important advantages of digital signatures over MACs as follows:
- A qualitative advantage that digital signatures have as compared to MACs is that signatures are publicly verifiable.
- Digital signature schemes also provide the very important property of non repudiation. that means that once signs a message he cannot later deny having done so. MACs simply cannot provide non-repudiation.
- MACs have the advantage of being shorted and roughly 2 to 3 orders of magnitude more efficient than digital signatures.
Digital Signature Syntax:
A (digital) signature scheme consists of three probabilistic polynomial-time algorithms such that:
| takes as input a security parameter and outputs a pair of keys | |
| takes as input a private key and a message from some message space. It outputs a signature , and we write this as . | |
| The deterministic verification algorithm takes as input a public key , a message , and a signature . It outputs a bit , . |
Hash and Sign Paradigm:
The intuition behind the hash-and-sign approach is straightforward. Say we have a signature scheme for messages of length , and wish to sign a (longer) message . Rather than sign itself, we can instead use a hash function to hash the message down to a fixed-length digest of length , and then sign the resulting digest.
