Re: [RFC][PATCH 0/6] crypto: Adding Hash-Encrypt-Hash(HEH)

2016-11-15 Thread Alex Cope
at Herbert currently has out for review. Cheers, -Alex On Mon, Nov 14, 2016 at 1:01 PM, Alex Cope wrote: > This patchset implements HEH, which is currently specified by the > following Internet Draft: > > https://tools.ietf.org/html/draft-cope-heh-00 > > This patchset is

[RFC][PATCH 3/7] crypto: gf128mul - Add ble multiplication functions

2016-11-14 Thread Alex Cope
degree polynomial term), and the bytes are stored in little endian order which matches the endianness of most modern CPUs. These new functions will be used by the HEH algorithm. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/gf128mul.c | 99

[RFC][PATCH 4/7] crypto: shash - Add crypto_grab_shash() and crypto_spawn_shash_alg()

2016-11-14 Thread Alex Cope
Analogous to crypto_grab_skcipher() and crypto_spawn_skcipher_alg(), these are useful for algorithms that need to use a shash sub-algorithm, possibly in addition to other sub-algorithms. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/shash.c | 8

[RFC][PATCH 6/7] crypto: testmgr - Add test vectors for HEH

2016-11-14 Thread Alex Cope
Adding test vectors from https://tools.ietf.org/html/draft-cope-heh-00 Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/testmgr.c | 15 crypto/testmgr.h | 226 +++ 2 files changed, 241 insertions(+) diff --git a/crypto

[RFC][PATCH 5/7] crypto: heh - Add Hash Encrypt Hash(HEH) algorithm

2016-11-14 Thread Alex Cope
: Alex Cope Signed-off-by: Eric Biggers --- crypto/Kconfig | 17 ++ crypto/Makefile | 1 + crypto/heh.c| 814 3 files changed, 832 insertions(+) create mode 100644 crypto/heh.c diff --git a/crypto/Kconfig b/crypto/Kconfig index

[RFC][PATCH 1/7] crypto: skcipher adding skciper_walk_virt_init

2016-11-14 Thread Alex Cope
Adding skcipher_walk_virt_init to allow a skciper_walk to specify length and input/output sg. Provides similar funcationalty to blkcipher_walk_init Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/skcipher.c | 32 +++- include/crypto

[RFC][PATCH 2/7] crypto: gf128mul - Refactor gf128 overflow macros

2016-11-14 Thread Alex Cope
Rename and clean up the overflow macros. Their usage is more general than the name suggested. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/gf128mul.c | 68 +-- 1 file changed, 41 insertions(+), 27 deletions(-) diff --git a

[RFC][PATCH 0/7] crypto: Adding Hash-Encrypt-Hash(HEH)

2016-11-14 Thread Alex Cope
This patchset implements HEH, which is currently specified by the following Internet Draft: https://tools.ietf.org/html/draft-cope-heh-00 This patchset is a request for comments, and should not be merged at this time. We would like to wait for further comments on the Internet Dr

[PATCH] crypto: gf128mul - Zero memory when freeing multiplication table

2016-11-14 Thread Alex Cope
GF(2^128) multiplication tables are typically used for secret information, so it's a good idea to zero them on free. Signed-off-by: Alex Cope Signed-off-by: Eric Biggers --- crypto/gf128mul.c | 4 ++-- include/crypto/gf128mul.h | 2 +- 2 files changed, 3 insertions(+), 3 dele

[PATCH RESEND] crypto: gf128mul - remove dead gf128mul_64k_lle code

2016-11-08 Thread Alex Cope
This code is unlikely to be useful in the future because transforms don't know how often keys will be changed, new algorithms are unlikely to use lle representation, and tables should be replaced with carryless multiplication instructions when available. Signed-off-by: Alex Cope --- c

[PATCH] crypto: gf128mul - remove dead gf128mul_64k_lle code

2016-11-03 Thread Alex Cope
This code is unlikely to be useful in the future because transforms don't know how often keys will be changed, new algorithms are unlikely to use lle representation, and tables should be replaced with carryless multiplication instructions when available. Signed-off-by: Alex Cope --- c

Equivalent of blkciper_walk for skcipher

2016-10-24 Thread Alex Cope
How should an algorithm implementing the skcipher api walk over the scatterlist? blkcipher_walk seems to be what I need, but the API is not compatible with skciper at the moment. Repeatedly calling scatterwalk_map_and_copy looks like it will work, but would be less performant than using something

Re: Moving from blkcipher to skcipher

2016-10-03 Thread Alex Cope
g, 3. Oktober 2016, 10:06:23 CEST schrieb Alex Cope: > > Hi Alex, > >> I'm currently working on implementing HEH encryption, and am in the >> process of switching from the blkcipher interface to the skcipher >> interface. All the examples I have found that use skcipher

Moving from blkcipher to skcipher

2016-10-03 Thread Alex Cope
I'm currently working on implementing HEH encryption, and am in the process of switching from the blkcipher interface to the skcipher interface. All the examples I have found that use skcipher are wrapping another mode of operation I.E. cts in cts(cbc(aes)) rather than being directly above the blo