mirror of
https://github.com/logos-messaging/nim-chat-poc.git
synced 2026-01-02 14:13:10 +00:00
remove unused parameter
This commit is contained in:
parent
ba124a3739
commit
bead4b62c2
@ -31,9 +31,6 @@ type Doubleratchet* = object
|
||||
skippedMessageKeys: Table[(PublicKey,MsgCount), MessageKey]
|
||||
|
||||
const DomainSepKdfRoot = "DoubleRatchet"
|
||||
const DomainSepKdfMsg = "MessageKey"
|
||||
const DomainSepKdfChain = "ChainKey"
|
||||
|
||||
|
||||
|
||||
type DrHeader* = object
|
||||
@ -68,8 +65,8 @@ func kdfRoot(self: var Doubleratchet, rootKey: RootKey, dhOutput:DhDerivedKey):
|
||||
|
||||
func kdfChain(self: Doubleratchet, chainKey: ChainKey): (MessageKey, ChainKey) =
|
||||
|
||||
let msgKey = hkdfExtract(chainKey, [0x01u8], cast[seq[byte]](DomainSepKdfMsg))
|
||||
let chainKey = hkdfExtract(chainKey, [0x02u8], cast[seq[byte]](DomainSepKdfChain))
|
||||
let msgKey = hkdfExtract(chainKey, [0x01u8])
|
||||
let chainKey = hkdfExtract(chainKey, [0x02u8])
|
||||
|
||||
return(msgKey, chainKey)
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@ import errors
|
||||
import types
|
||||
|
||||
|
||||
func hkdfExtract*(salt: openArray[byte], ikm: openArray[byte], info: openArray[byte] ) : GenericArray =
|
||||
func hkdfExtract*(salt: openArray[byte], ikm: openArray[byte]) : GenericArray =
|
||||
|
||||
assert GenericArray.len == sha256.digestSize()
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user