Releases: spider-gazelle/openssl_ext
Releases · spider-gazelle/openssl_ext
v2.8.4
What's Changed
- update BIO callback and data access for newer Crystal by @mamantoha in #18
New Contributors
- @mamantoha made their first contribution in #18
v2.8.3
v2.8.2
v2.8.1
v2.8.0
v2.7.0
New LibCrypto bindings (src/openssl_ext/lib_crypto.cr:351-353):
- ec_key_set_public_key - Set EC public key
- ec_key_get0_private_key - Get EC private key BIGNUM
- ec_key_set_private_key - Set EC private key
New class methods (src/openssl_ext/pkey/ec.cr:98-201):
- OpenSSL::PKey::EC.from_private_bytes(bytes, curve) - Create EC key from raw private key bytes
- Automatically derives the public key from private key
- P-256: expects 32 bytes
- P-384: expects 48 bytes
- OpenSSL::PKey::EC.from_public_bytes(bytes, curve) - Create public key from raw bytes
- Accepts uncompressed format (0x04 + x + y)
- Validates point is on curve
New instance methods (src/openssl_ext/pkey/ec.cr:280-314):
- private_key_bytes : Bytes - Export private key as raw bytes
- public_key_bytes : Bytes - Export public key as raw uncompressed bytes