1
0
mirror of https://github.com/kepler155c/opus synced 2025-12-23 00:06:59 +00:00

crypto cleanup

This commit is contained in:
kepler155c@gmail.com
2019-06-28 06:33:47 -04:00
parent bcd33af599
commit c3d52c1aab
10 changed files with 35 additions and 306 deletions

View File

@@ -2,6 +2,8 @@ local fq = require('crypto.ecc.fq')
local elliptic = require('crypto.ecc.elliptic')
local sha256 = require('crypto.sha2')
local os = _G.os
local q = {1372, 62520, 47765, 8105, 45059, 9616, 65535, 65535, 65535, 65535, 65535, 65532}
local sLen = 24
@@ -35,9 +37,7 @@ local function exchange(sk, pk)
Z = elliptic.pointScale(Z)
local ss = fq.bytes(Z[2])
local ss = sha256.digest(ss)
return ss
return sha256.digest(ss)
end
local function sign(sk, message)