SwiftPQ helps you utilize Post-Quantum Digital Signature and Key Encapsulation schemes in your project. Based on PQClean
SwiftPQ utilizes wrapped C functions from PQClean
Available algorithms
KEM:
Digital Signature:
./SwiftPQCLI -g -a kyber512 --save .
./SwiftPQCLI -c -a kyber512 -p <path>
./SwiftPQCLI -s -m <message> -p <pathToKeys> -a <algorithm>
./SwiftPQCLI --signature <signature> -m <message> -p <pathToKeys> -a <algorithm>
Add it to your App:
.package(url: "https://github.com/bigvo/swiftpq.git", from: "0.0.1"),
import with
import SwiftPQ
Use with your Vapor app:
// Play with KEM
let kyber512 = PQCrypto.KEM.Kyber512()
let keys = kyber512.kemKeypair()
let encrypt = kyber512.kemEncrypt(publicKey: keys.publicKey)
let sharedSecret = kyber512.kemDecrypt(cipherText: encrypt.cipherText, secretKey: keys.secretKey)
if encrypt.sharedSecret == sharedSecret {
// Do something
}
// Play with Digital Signatures
let dilithium2 = PQCrypto.SIGN.Dilithium2()
let keys = dilithium2.signKeypair()
...
Each subdirectory containing implementations contains a LICENSE
file stating under what license that specific implementation is released.
The files in common
contain licensing information at the top of the file (and are currently either public domain or MIT).
All other code in this repository is released under the conditions of MIT.
link |
Stars: 3 |
Last commit: 1 year ago |
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics