Add curve 25519 variants of AsymmetricKey
For both Ed25519Key and X25519Key, the PKCS#8 encoded private key is
stored in the key_material_ field of the base Key class.
The i2d_PrivateKey() function in OpenSSL doesn't cope with curve 25519
keys, so extend it.
Also include helper functions that check {hw,sw}_enforced authorizations
to determine if a key is {Ed,X}25519.
Test: build
Bug: 194358913
Change-Id: If9806f8266195d69a116f5ed8ce60f29e63319cb
fixup: commonize to Curve25519Key, store in PKCS#8 format
Change-Id: I484e2510938c5a04c7ff47ff724f93df2dceae65
4 files changed