mirror of
https://github.com/kepler155c/opus
synced 2025-01-03 20:30:28 +00:00
oops
This commit is contained in:
parent
86e918667c
commit
159dc622fd
@ -106,14 +106,15 @@ local function newSocket(isLoopback)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function setupCrypto(socket, isClient)
|
local function setupCrypto(socket, isClient)
|
||||||
|
socket.sharedKey = ECC.exchange(socket.privKey, socket.remotePubKey)
|
||||||
|
socket.enckey = SHA.pbkdf2(socket.sharedKey, "1enc", 1)
|
||||||
|
--self.hmackey = SHA.pbkdf2(self.sharedKey, "2hmac", 1)
|
||||||
|
|
||||||
socket.rrng = Crypto.newRNG(
|
socket.rrng = Crypto.newRNG(
|
||||||
SHA.pbkdf2(socket.sharedKey, isClient and "3rseed" or "4sseed", 1))
|
SHA.pbkdf2(socket.sharedKey, isClient and "3rseed" or "4sseed", 1))
|
||||||
socket.wrng = Crypto.newRNG(
|
socket.wrng = Crypto.newRNG(
|
||||||
SHA.pbkdf2(socket.sharedKey, isClient and "4sseed" or "3rseed", 1))
|
SHA.pbkdf2(socket.sharedKey, isClient and "4sseed" or "3rseed", 1))
|
||||||
|
|
||||||
socket.sharedKey = ECC.exchange(socket.privKey, socket.remotePubKey)
|
|
||||||
socket.enckey = SHA.pbkdf2(socket.sharedKey, "1enc", 1)
|
|
||||||
--self.hmackey = SHA.pbkdf2(self.sharedKey, "2hmac", 1)
|
|
||||||
socket.rseq = socket.rrng:nextInt(5)
|
socket.rseq = socket.rrng:nextInt(5)
|
||||||
socket.wseq = socket.wrng:nextInt(5)
|
socket.wseq = socket.wrng:nextInt(5)
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user