- Notifications
You must be signed in to change notification settings - Fork 1
ETLS(Enhanced Transport Layer Security)
Ggicci edited this pageDec 24, 2018 · 3 revisions
- auxten, CovenantSQL
- May, 2018"
ETLS(Enhanced Transport Layer Security) is the Transport Layer Security of CovenantSQL.
- Use Elliptic Curve Secp256k1 for Asymmetric Encryption
- ECDH for Key Exchange
- PKCS#7 for padding
- AES-256-CBC for Symmetric Encryption
// Elliptic Curve Public Key can be computed form Private Key
ECPubKey := ECPrivKey.Pub()
GenECDHSharedSecret(BPub, APriv) == GenECDHSharedSecret(APub, BPriv)
Pseudo Code below:
newPrivateKey, newPubKey := genSecp256k1Keypair()
encKey, HMACKey := SHA512(ECDH(newPrivateKey, inputPublicKey))
PaddedIn := PKCSPadding(in)
OutBytes := IV + newPubKey + AES-256-CBC(encKey, PaddedIn) + HMAC-SHA-256(HMACKey)
Key Management RPC Sequence Explaination in a Chart: