Archived
1
0

Merge pull request #173 from cathugger/master

srnd: use all bits of blake2b for signature
This commit is contained in:
Jeff 2019-01-25 13:54:30 -05:00 committed by GitHub
commit 35122e6459
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -189,7 +189,7 @@ func signArticle(nntp NNTPMessage, seed []byte) (signed *nntpArticle, err error)
}
}
sha := sha512.New()
blake := blake2b.New256()
blake := blake2b.New512()
signed.signedPart = &nntpAttachment{}
// write body to sign buffer
mw := io.MultiWriter(sha, blake, signed.signedPart)
@ -524,7 +524,7 @@ func verifyMessageBLAKE2B(pk, sig string, body io.Reader, innerHandler func(map[
log.Println("unwrapping signed message from", pk)
pk_bytes := unhex(pk)
sig_bytes := unhex(sig)
h := blake2b.New256()
h := blake2b.New512()
pr, pw := io.Pipe()
// read header
// handle inner body