Merge pull request #173 from cathugger/master
srnd: use all bits of blake2b for signature
This commit is contained in:
commit
35122e6459
@ -189,7 +189,7 @@ func signArticle(nntp NNTPMessage, seed []byte) (signed *nntpArticle, err error)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
sha := sha512.New()
|
sha := sha512.New()
|
||||||
blake := blake2b.New256()
|
blake := blake2b.New512()
|
||||||
signed.signedPart = &nntpAttachment{}
|
signed.signedPart = &nntpAttachment{}
|
||||||
// write body to sign buffer
|
// write body to sign buffer
|
||||||
mw := io.MultiWriter(sha, blake, signed.signedPart)
|
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)
|
log.Println("unwrapping signed message from", pk)
|
||||||
pk_bytes := unhex(pk)
|
pk_bytes := unhex(pk)
|
||||||
sig_bytes := unhex(sig)
|
sig_bytes := unhex(sig)
|
||||||
h := blake2b.New256()
|
h := blake2b.New512()
|
||||||
pr, pw := io.Pipe()
|
pr, pw := io.Pipe()
|
||||||
// read header
|
// read header
|
||||||
// handle inner body
|
// handle inner body
|
||||||
|
Reference in New Issue
Block a user