Package fr. acinq. lightning. crypto. noise
Types
Byte Stream
Link copied to clipboard
interface ByteStream
Content copied to clipboard
Chacha20Poly1305Cipher Functions
Link copied to clipboard
Cipher Functions
Link copied to clipboard
interface CipherFunctions
Content copied to clipboard
Cipher functions
Cipher State
Link copied to clipboard
interface CipherState
Content copied to clipboard
Cipher state
DHFunctions
Link copied to clipboard
interface DHFunctions
Content copied to clipboard
Extended Cipher State
Link copied to clipboard
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 | +-------------------------------
Handshake Pattern
Link copied to clipboard
data class HandshakePattern(name: String, initiatorPreMessages: List<MessagePattern>, responderPreMessages: List<MessagePattern>, messages: List<List<MessagePattern>>)
Content copied to clipboard
Handshake State
Link copied to clipboard
sealed class HandshakeState
Content copied to clipboard
Handshake State Reader
Link copied to clipboard
data class HandshakeStateReader(messages: List<List<MessagePattern>>, state: SymmetricState, s: Pair<ByteArray, ByteArray>, e: Pair<ByteArray, ByteArray>, rs: ByteArray, re: ByteArray, dh: DHFunctions, byteStream: ByteStream) : HandshakeState
Content copied to clipboard
Handshake State Writer
Link copied to clipboard
data class HandshakeStateWriter(messages: List<List<MessagePattern>>, state: SymmetricState, s: Pair<ByteArray, ByteArray>, e: Pair<ByteArray, ByteArray>, rs: ByteArray, re: ByteArray, dh: DHFunctions, byteStream: ByteStream) : HandshakeState
Content copied to clipboard
Hash Functions
Link copied to clipboard
interface HashFunctions
Content copied to clipboard
Hash functions
Initialized Cipher State
Link copied to clipboard
data class InitializedCipherState(k: ByteArray, n: Long, cipher: CipherFunctions) : CipherState
Content copied to clipboard
Initialized cipher state
Message Pattern
Link copied to clipboard
Random Bytes
Link copied to clipboard
Secp256k1DHFunctions
Link copied to clipboard
SHA256Hash Functions
Link copied to clipboard
Symmetric State
Link copied to clipboard
data class SymmetricState(cipherState: CipherState, ck: ByteArray, h: ByteArray, hashFunctions: HashFunctions)
Content copied to clipboard
Uninitialized Cipher State
Link copied to clipboard
data class UninitializedCipherState(cipher: CipherFunctions) : CipherState
Content copied to clipboard
Uninitialized cipher state. Encrypt and decrypt do nothing (ciphertext = plaintext)