Extended Cipher State
data class ExtendedCipherState(cs: CipherState, ck: ByteArray) : CipherState
Content copied to clipboard
extended cipher state which implements key rotation as per BOLT #8 message format is: +------------------------------- |2-byte encrypted message length| +------------------------------- | 16-byte MAC of the encrypted | | message length | +------------------------------- | | | | | encrypted lightning | | message | | | +------------------------------- | 16-byte MAC of the | | lightning message | +-------------------------------
Parameters
cs
cipher state
ck
chaining key
Constructors
ExtendedCipherState
Link copied to clipboard
Functions
cipher
Link copied to clipboard
decrypt With Ad
Link copied to clipboard
open override fun decryptWithAd(ad: ByteArray, ciphertext: ByteArray): Pair<CipherState, ByteArray>
Content copied to clipboard
encrypt With Ad
Link copied to clipboard
open override fun encryptWithAd(ad: ByteArray, plaintext: ByteArray): Pair<CipherState, ByteArray>
Content copied to clipboard
initialize Key
Link copied to clipboard