Skip to content

ETLS(Enhanced Transport Layer Security)

Ggicci edited this page Dec 24, 2018 · 3 revisions

Author

  • auxten, CovenantSQL
  • May, 2018"

ETLS(Enhanced Transport Layer Security) is the Transport Layer Security of CovenantSQL.

RPC Signature Features

  • Use Elliptic Curve Secp256k1 for Asymmetric Encryption
  • ECDH for Key Exchange
  • PKCS#7 for padding
  • AES-256-CBC for Symmetric Encryption

Some Knowledge

// Elliptic Curve Public Key can be computed form Private Key
ECPubKey := ECPrivKey.Pub()
GenECDHSharedSecret(BPub, APriv) == GenECDHSharedSecret(APub, BPriv)

EncryptAndSign Main Procedure

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

Key Management RPC Sequence Explaination in a Chart: Key Management RPC Sequence


CovenantSQL Authors License

You can’t perform that action at this time.