Kitura / BlueRSA

RSA public/private key encryption, private key signing and public key verification in Swift using the Swift Package Manager. Works on iOS, macOS, and Linux (work in progress).
Apache License 2.0
131 stars 58 forks source link

feat: Add gcm algorithm for cross platform encryption/decryption #33

Closed Andrew-Lees11 closed 5 years ago

Andrew-Lees11 commented 5 years ago

Description

This pull request adds a new algorithm case called gcm. This will use SHA1 for signing/verifying. For encryption/decryption it will use:

This makes it compatible with the Apple SecKeyCreateEncryptedData/SecKeyCreateDecryptedData. As a result you will be able to encrypt on an apple device and decrypt on linux using this algorithm.

The travis builds will fail until a new patch of openSSL 1 and 2 with EVP_CIPHER_CTX_init_wrapper are released

Motivation and Context

This is a fix for issue #32 to allow cross platform RSA encryption.

How Has This Been Tested?

The gcm algorithm has been added to the current tests. Two new tests have also been added using previously encrypted data from linux and mac to test cross platform support.