This allowed users to create invalid Ed25519 Extended Secret Keys
with potentially cryptographically weak ECDSA Signatures.
However we still allow to have an _unsafe_ version to construct
a `SecretKeyExtended` from bytes without performing checks.
This is in order to allow a compatibility path without breaking
codes too much.
allow the direct conversion from XPrv from ed25519_bip32 crates to pallas-crypto's SecretKeyExtended without performing the bit tweaks check
While it is unsafe to call the SecretKeyExtended::from_bytes_unchecked
(unsafe in the cryptographic sense, not in the rust memory management
sense) we know this is going to be okay because the XPrv was already
safely created.
We previously removed the direct conversion of byte arrays into SecretKeyExtended
This has been replaced with a `TryFrom` and a `from_bytes() -> Result<Self>` function.
This allows us to perform the recovery of the wrapped private keys
without losing the security of performing the checks of the validity
of the Ed25519 Extended structure.
This should be safe to use and shouldn't make incompatibilities
because the Xprv was already checked for bit tweaks previously
in the flow.
add unsafe functions to leak the content of the SecretKey or SecretKeyExtended
Remove the From implementation to convert Secret Keys into Bytes
Instead prefer the explicit unsafe functions to leak the content of the keys
temporarily remove the public access of the as_bytes function
this is to prevent leaking the bytes of the private keys.
feat!: Return the socket address when accepting a connection
BREAKING CHANGE: The signature for Bearer.accept_tcp now returns the bearer, and the address that connected.
This can, for example, be used to implement allow and deny lists for accepting or rejecting incoming connections.
* Return the remote address from accept_unix
* cargo fmt
* Fix comment formatting
* Add constants for known miniprotocols
Now consumers of the crate don't have to memorize what channel number means what
* Add myself to the crate authors