mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-05 23:28:48 +00:00
core/crypto/aes: Slightly tweak GHASH to look less spooky
This commit is contained in:
@@ -80,8 +80,8 @@ ghash :: proc "contextless" (dst, key, data: []byte) {
|
|||||||
h2 := h0 ~ h1
|
h2 := h0 ~ h1
|
||||||
h2r := h0r ~ h1r
|
h2r := h0r ~ h1r
|
||||||
|
|
||||||
src: []byte
|
|
||||||
for l > 0 {
|
for l > 0 {
|
||||||
|
src: []byte = ---
|
||||||
if l >= _aes.GHASH_BLOCK_SIZE {
|
if l >= _aes.GHASH_BLOCK_SIZE {
|
||||||
src = buf
|
src = buf
|
||||||
buf = buf[_aes.GHASH_BLOCK_SIZE:]
|
buf = buf[_aes.GHASH_BLOCK_SIZE:]
|
||||||
|
|||||||
@@ -240,8 +240,8 @@ ghash :: proc "contextless" (dst, key, data: []byte) #no_bounds_check {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Process 1 block at a time
|
// Process 1 block at a time
|
||||||
src: []byte
|
|
||||||
for l > 0 {
|
for l > 0 {
|
||||||
|
src: []byte = ---
|
||||||
if l >= _aes.GHASH_BLOCK_SIZE {
|
if l >= _aes.GHASH_BLOCK_SIZE {
|
||||||
src = buf
|
src = buf
|
||||||
buf = buf[_aes.GHASH_BLOCK_SIZE:]
|
buf = buf[_aes.GHASH_BLOCK_SIZE:]
|
||||||
|
|||||||
Reference in New Issue
Block a user