provide ciphers with {de,en}crypt_into functionality (#231)
* Mirage_crypto.Block.ECB with {de,en}crypt_into
Also provide unsafe_{en,de}crypt_into for further performance.
* Mirage_crypto.Block.CBC now has {de,en}crypt_into functionality
This may avoid buffer allocations. There are as well unsafe functions for those
feeling bounds checks are unnecessary.
* counters: add an offset parameter
* Mirage_crypto.Block.CTR with {de,en}crypt_into
* GCM and ChaCha have {de,en}crypt_into now
* CCM16 with {de,en}crypt_into
* minor adjustments to speed
* Apply suggestions from code review
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
* revise bounds checks (cc @reynir @palainp), also check off >= 0
* revise block_size check
* update documentation, esp off < 0
* poly1305: mac_into appropriate bounds checks, also unsafe_mac_into
* ccm: remove maclen argument, and ensure tag_size = block_size
* add tailcall annotations, remove an argument from ccm's loop
---------
Co-authored-by: Reynir Björnsson <reynir@reynir.dk>
ba299d
-
Jun 29 05:00 +00:00