Build a public key cryptosystem using a key encapsulation mechanism (KEM)
- For:
- CCNY CSC480 Computer Security
- Fall 2017
- CCNY CSC480 Computer Security
- Idea:
- build asymmetric system
- RSA
- using GMP to operate with arbitrary precision numbers
- RSA
- build symmetric system denoted as SKE
- SKE that works only on buffers
- SKE that works on files
- SKE
- Encryption:
- 16 byte IV | C = AES(plaintext) | 32byte SHA256 HMAC(C)
- IV = initialization vectors, unpredictable random number to make sure that when same message is encrypted more than once, the ciphertext is different
- Decryption:
- Check hmac of iv + c
- Decrypt ciphertext
- Encryption:
- KEM:
- combine RSA and SKE on files
- ciphertext will be:
- RSA-KEM(x) | SKE ciphertext
- Generate SKE key with x, where x has as much entropy as the key
- build asymmetric system
- git clone & cd to directory
make
- run the make file
./kem-enc -h
- This was tested on an UbuntuLinux environment.
- Push the changes to own branch
git add <file>
git commit -a -m <message>
git push
- Merge and push from master branch to master remote
git checkout master
git merge <user branch>
git push
- Go back to own branch
git checkout <user branch>
- Make sure local branch is updated
git add <files>
git commit -a -m "message"
git push
- Pull from Master branch
git checkout master
git pull
- Merge with Master from own branch and push
git checkout <user branch>
git merge master
git push