This section describes new features that were added in the version 2.0.
Fast elliptic curve algorithms were added:
- Curve25519 - elliptic curve used for ECDH operations;
- Ed25519 - elliptic curve used for EdDSA and ECDH operations.
Mentioned algorithms are accessible via VirgilKeyPair::Type::FAST_EC_X25519
and VirgilKeyPair::Type::FAST_EC_ED25519
enumeration values.
Algorithms implementation is based on SUPERCOP reference implementation, so it contains optimizations for AMD64 processor architecture.
See also:
VirgilKeyPair::
encryptPrivateKey()
- encrypt given private key and store it in the PKCS#8 formatdecryptPrivateKey()
- decrypt given private key and store it in the corresponding plain private key formatgenerateRecommended()
- generate new key pair with recommended safest typeextractPublicKey()
- extract public key from the private keypublicKeyToPEM()
- convert given public key to the PEM formatpublicKeyToDER()
- convert given public key to the DER formatprivateKeyToPEM()
- convert given private key to the PEM formatprivateKeyToDER()
- convert given private key to the DER format
This section describes changes to the library API 2.0 that are not compatible with API 1.8.
- Target compiler must be able to compile C++11 standard.
- All enumerations were replaced with scoped enums.
- Move semantic is used instead of 'shallow' copying.
Now library produces only exceptions of type VirgilCryptoException
. Produced exceptions can contain nested exceptions.
To get all error messages (including nested) function virgil::crypto::backtrace_exception()
can be used.
Exception details are defined by specific error code and corresponding error category.
Error categories are:
VirgilCryptoErrorCategory
- category that handles generic error codes defined in enumVirgilCryptoError
;VirgilSystemCryptoErrorCategory
- category that handles error codes from the system crypto library (MbedTLS).
Named constructors such as VirgilHash::sha256()
were replaced with constructor that accepts corresponding enumeration value.
VirgilHash::sha256()
withVirgilHash(VirgilHash::Algorithm::SHA256)
, and so on;VirgilPBKDF::pbkdf2()
withVirgilPBKDF(VirgilPBKDF::Algorithm::PBKDF2)
, and so on;VirgilPBE::pkcs5()
withVirgilPBE(VirgilPBE::Algorithm::PKCS5)
, and so on;VirgilSymmetricCipher::aes256()
withVirgilSymmetricCipher(VirgilSymmetricCipher::Algorithm::AES_256_GCM)
, and so on.
Dropped enumeration values that were represented as unimplemented algorithms:
VirgilKeyPair::Type::EC_M221
VirgilKeyPair::Type::EC_M255
VirgilKeyPair::Type::EC_M383
VirgilKeyPair::Type::EC_M511
Enumeration value VirgilKeyPair::Type::Default
was replaced with function VirgilKeyPair::generateRecommended()
Now VirgilChunkCipher
class has the same interface as class VirgilStreamCipher
, but the main difference is the way data is proceeded.
VirgilChunkCipher
treats each data portion as separate data to be proceeded. So each encrypted data chunk contains encrypted data and verification tag.
- Default value of 2nd parameter
embedContentInfo
of functionVirgilCipher::encrypt()
is now true by default. - Default value of 3rd parameter
embedContentInfo
of functionVirgilStreamCipher::encrypt()
is now true by default.
- Change name for Apple frameworks:
VirgilCrypto.framework
toVSCCrypto.framework
. - Remove support of OS X universal binaries.
- Dropped AS3 support.