| |
| |
| |
|
|
| |
|
|
| package aes |
|
|
| |
|
|
| |
| func ctrBlocks1Asm(nr int, xk *[60]uint32, dst, src *[BlockSize]byte, ivlo, ivhi uint64) |
|
|
| |
| func ctrBlocks2Asm(nr int, xk *[60]uint32, dst, src *[2 * BlockSize]byte, ivlo, ivhi uint64) |
|
|
| |
| func ctrBlocks4Asm(nr int, xk *[60]uint32, dst, src *[4 * BlockSize]byte, ivlo, ivhi uint64) |
|
|
| |
| func ctrBlocks8Asm(nr int, xk *[60]uint32, dst, src *[8 * BlockSize]byte, ivlo, ivhi uint64) |
|
|
| func ctrBlocks1(b *Block, dst, src *[BlockSize]byte, ivlo, ivhi uint64) { |
| if !supportsAES { |
| ctrBlocks(b, dst[:], src[:], ivlo, ivhi) |
| } else { |
| ctrBlocks1Asm(b.rounds, &b.enc, dst, src, ivlo, ivhi) |
| } |
| } |
|
|
| func ctrBlocks2(b *Block, dst, src *[2 * BlockSize]byte, ivlo, ivhi uint64) { |
| if !supportsAES { |
| ctrBlocks(b, dst[:], src[:], ivlo, ivhi) |
| } else { |
| ctrBlocks2Asm(b.rounds, &b.enc, dst, src, ivlo, ivhi) |
| } |
| } |
|
|
| func ctrBlocks4(b *Block, dst, src *[4 * BlockSize]byte, ivlo, ivhi uint64) { |
| if !supportsAES { |
| ctrBlocks(b, dst[:], src[:], ivlo, ivhi) |
| } else { |
| ctrBlocks4Asm(b.rounds, &b.enc, dst, src, ivlo, ivhi) |
| } |
| } |
|
|
| func ctrBlocks8(b *Block, dst, src *[8 * BlockSize]byte, ivlo, ivhi uint64) { |
| if !supportsAES { |
| ctrBlocks(b, dst[:], src[:], ivlo, ivhi) |
| } else { |
| ctrBlocks8Asm(b.rounds, &b.enc, dst, src, ivlo, ivhi) |
| } |
| } |
|
|