/* * ARM64 ChaCha20 implementation meant for vDSO. Produces a given positive * number of blocks of output with nonce 0, taking an input key and 8-bytes * counter. Importantly does not spill to the stack. * * This implementation avoids d8-d15 because they are callee-save in user * space. * * void __arch_chacha20_blocks_nostack(uint8_t *dst_bytes, * const uint8_t *key, * uint32_t *counter, * size_t nblocks) * * x0: output bytes * x1: 32-byte key input * x2: 8-byte counter input/output * x3: number of 64-byte block to write to output
*/
SYM_FUNC_START(__arch_chacha20_blocks_nostack)
.Lblock: /* copy state to auxiliary vectors for the final add after the permute. */
mov state0.16b, copy0.16b
mov state1.16b, copy1.16b
mov state2.16b, copy2.16b
mov state3.16b, copy3.16b
mov w4, 20
.Lpermute: /* * Permute one 64-byte block where the state matrix is stored in the four NEON * registers state0-state3. It performs matrix operations on four words in parallel, * but requires shuffling to rearrange the words after each round.
*/
/* Zero out the potentially sensitive regs, in case nothing uses these again. */
movi state0.16b, #0
movi state1.16b, #0
movi state2.16b, #0
movi state3.16b, #0
movi copy1.16b, #0
movi copy2.16b, #0
ret
SYM_FUNC_END(__arch_chacha20_blocks_nostack)
emit_aarch64_feature_1_and
Messung V0.5
¤ Dauer der Verarbeitung: 0.13 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.