IntersectMBO / IntersectMBO/cardano-crypto
Cardano xPrv to Crypto.PubKey.Ed25519.SecretKey
Open
- Dominant language
- C
- Stars
- 68
- Forks
- 42
- PR merge metrics
- No merged PRs in 30d
Description
Ib cardano we have next methods
```
Generate extended public key from private key
toXPub :: HasCallStack => XPrv -> XPub
toXPub (XPrv ekey) = XPub pub (ChainCode cc)
where (_,r) = B.splitAt 64 $ convert ekey
(pub, cc) = B.splitAt 32 r
Return the Ed25519 public key associated with a XPub context
xPubGetPublicKey :: XPub -> Ed25519.PublicKey
xPubGetPublicKey (XPub pub _) =
throwCryptoError $ Ed25519.publicKey pub
```
How can we get Ed25519.SecretKey from XPrv ?
Ed25519.SecretKey expects 32 bytes, how to map first XPriv 64 bytes to Ed25519.SecretKey ?
Contributor guide
Assessment
This issue has not been assessed yet.