Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
as an IPsec Encapsulating Security Payload (ESP) mechanism
to provide confidentiality and data origin authentication.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/caamalg.c | 430
the GCM
specification.
Signed-off-by: Tudor Ambarus
Signed-off-by: Horia Geanta
---
drivers/crypto/caam/caamalg.c | 330 --
1 file changed, 320 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
the GCM
specification.
Signed-off-by: Tudor Ambarus
Signed-off-by: Horia Geanta
---
drivers/crypto/caam/caamalg.c | 331 --
1 file changed, 321 insertions(+), 10 deletions(-)
diff --git a/drivers/crypto/caam/caamalg.c b/drivers/crypto/caam/caamalg.c
Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
as an IPsec Encapsulating Security Payload (ESP) mechanism
to provide confidentiality and data origin authentication.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/caamalg.c | 423
On 10/14/2014 12:17 PM, Tudor Ambarus wrote:
+static int rfc4106_setkey(struct crypto_aead *aead,
+ const u8 *key, unsigned int keylen)
+{
+ struct caam_ctx *ctx = crypto_aead_ctx(aead);
+ struct device *jrdev = ctx->jrdev;
+ int ret
Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
as an IPsec Encapsulating Security Payload (ESP) mechanism
to provide confidentiality and data origin authentication.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/caamalg.c | 424
the GCM
specification.
Signed-off-by: Tudor Ambarus
Signed-off-by: Horia Geanta
---
This new patchset fixes GCM's input sequence format, when data is contiguous.
drivers/crypto/caam/caamalg.c | 342 --
1 file changed, 331 insertions(+), 11 dele
Add Advanced Encryption Standard (AES) in Galois/Counter Mode (GCM)
as an IPsec Encapsulating Security Payload (ESP) mechanism
to provide confidentiality and data origin authentication.
Signed-off-by: Tudor Ambarus
---
This new patchset fixes rfc4106's input sequence format, when da
This patch fixes the assumption that output sequence is not contiguous
when input sequence is not contiguous and in-place encryption is done.
Output sequence does not need to be contiguous with associated data.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/caamalg.c | 3 ++-
1 file
This patch fixes the assumption that output sequence is not contiguous
when input sequence is not contiguous and in-place encryption is done.
Output sequence does not need to be contiguous with associated data.
Signed-off-by: Tudor Ambarus
---
Substitute 'caam: caamalg' with 'c
Add AES-GMAC as an IPSec ESP mechanism to provide
data origin authentication, but not confidentiality.
This method is referred as ENCR_NULL_AUTH_AES_GMAC.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/caamalg.c | 459 +-
1 file changed, 458
Add AES-GMAC as an IPSec ESP mechanism to provide
data origin authentication, but not confidentiality.
This method is referred as ENCR_NULL_AUTH_AES_GMAC.
Signed-off-by: Tudor Ambarus
---
removed a blank line introduced in aead_encrypt function.
drivers/crypto/caam/caamalg.c | 458
!= caam endianness.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/desc.h | 6 --
drivers/crypto/caam/regs.h | 8
drivers/crypto/caam/sg_sw_sec4.h | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/caam/desc.h b/drivers/crypto/caam
!= caam endianness.
Signed-off-by: Tudor Ambarus
---
v2: Removed mx7d restriction.
drivers/crypto/caam/desc.h | 6 --
drivers/crypto/caam/regs.h | 8
drivers/crypto/caam/sg_sw_sec4.h | 2 +-
3 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/drivers/crypto/caam
Hi, Marcel, Kyle,
On 07/17/2017 09:17 PM, Marcel Holtmann wrote:
Hi Kyle,
I am confused about several things in the new key agreement code.
net/bluetooth/smp.c in two places generates random bytes for the
private_key argument to
net/bluetooth/ecdh_helper.c:generate_ecdh_keys, which suggests t
Hi, Stephan,
On 08/10/2017 09:39 AM, Stephan Müller wrote:
Add the flags for handling signature generation and signature
verification.
The af_alg helper code as well as the algif_skcipher and algif_aead code
must be changed from a boolean indicating the cipher operation to an
integer because th
On 08/10/2017 04:03 PM, Stephan Mueller wrote:
Is there a style requirement for that? checkpatch.pl does not complain. I
thought that one liners in a conditional should not have braces?
Linux coding style requires braces in both branches when you have a
branch with a statement and the other w
Hi, Stephan,
On 08/10/2017 09:40 AM, Stephan Müller wrote:
This patch adds the user space interface for asymmetric ciphers. The
interface allows the use of sendmsg as well as vmsplice to provide data.
The akcipher interface implementation uses the common AF_ALG interface
code regarding TX and R
Hi, Stephan,
On 08/10/2017 09:40 AM, Stephan Müller wrote:
Add the Makefile and Kconfig updates to allow algif_akcipher to be
compiled.
Signed-off-by: Stephan Mueller
---
crypto/Kconfig | 9 +
crypto/Makefile | 1 +
2 files changed, 10 insertions(+)
Any reason why you keep this p
Hi, all,
On 08/11/2017 07:05 PM, Marcel Holtmann wrote:
Hi Stephan,
AF_ALG is best suited for crypto use cases where a socket is set up once
and there are lots of reads and writes to justify the setup cost. With
asymmetric crypto, the setup cost is high when you might only use the
socket for a
Hi, Stephan,
+static int akcipher_setprivkey(void *private, const u8 *key,
+ unsigned int keylen)
+{
+ struct akcipher_tfm *tfm = private;
+ struct crypto_akcipher *akcipher = tfm->akcipher;
+ int err;
+
+ err = crypto_akcipher_set_priv_key(ak
On 08/21/2017 11:55 AM, Tudor Ambarus wrote:
Hi, Stephan,
+static int akcipher_setprivkey(void *private, const u8 *key,
+ unsigned int keylen)
+{
+struct akcipher_tfm *tfm = private;
+struct crypto_akcipher *akcipher = tfm->akcipher;
+int err;
+
+
Hi, Herbert,
On 02/02/2017 03:57 PM, Herbert Xu wrote:
Yes but RSA had an in-kernel user in the form of module signature
verification. We don't add algorithms to the kernel without
actual users. So this patch-set needs to come with an actual
in-kernel user of ECDSA.
ECDSA can be used by the
Hi, Sandy,
On 08/22/2017 08:22 PM, Sandy Harris wrote:
On Tue, Aug 22, 2017 at 12:14 PM, Tudor Ambarus
wrote:
Hi, Herbert,
On 02/02/2017 03:57 PM, Herbert Xu wrote:
Yes but RSA had an in-kernel user in the form of module signature
verification. We don't add algorithms to the k
/crypto/ecdh.h
@@ -40,7 +40,7 @@
*/
struct ecdh {
unsigned short curve_id;
- char *key;
+ const char *key;
unsigned short key_size;
};
I just came across this and remembered that Stephan already
made a patch, so:
Acked-by: Tudor Ambarus
7 04:17 PM, Tudor Ambarus wrote:
Hi, all,
On 08/11/2017 07:05 PM, Marcel Holtmann wrote:
Hi Stephan,
AF_ALG is best suited for crypto use cases where a socket is set up
once
and there are lots of reads and writes to justify the setup cost. With
asymmetric crypto, the setup cost is high when
Hi, Marcel,
On 08/30/2017 10:21 AM, Marcel Holtmann wrote:
you still need to get the public key out of the kernel if you want to use it
from user space. Or feed the remote public key if you plan to use some sort of
key derivation function.
The crypto hardware that I'm working on, generates
Hi, Marcel,
On 08/03/2017 11:40 AM, Marcel Holtmann wrote:
Essentially we do what all other key exchange procedure do. Generate a
private/public key pair, give the public key to the other side, run DH with the
value from the other side. That Bluetooth SMP knows about the private key is
really
generate and handle the ecdh private key,
potentially benefiting of hardware ecc private key generation and
retention.
Tested with selftest and with btmon and smp-tester on top of hci_vhci,
with ecdh done in both software and hardware (through atmel-ecc driver).
All tests passed.
Tudor Ambarus (2
ff-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 102 +---
net/bluetooth/smp.c | 55 +---
2 files changed, 67 insertions(+), 90 deletions(-)
diff --git a/net/bluetooth/ecdh_helper.c b/net/bluetooth/ecdh_helper.c
index ac
key pair generation with the shared secret
computation via the same crypto tfm. Once the key is set, we can
compute the shared secret without referring to the private key.
Signed-off-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 32 ---
net/bluetooth/ecdh_helper.h | 8
generate and handle the ecdh private key,
potentially benefiting of hardware ecc private key generation and
retention.
Tested with selftest and with btmon and smp-tester on top of hci_vhci,
with ecdh done in both software and hardware (through atmel-ecc driver).
All tests passed.
Tudor Ambarus
Hi, Marcel,
On 09/25/2017 04:02 PM, Marcel Holtmann wrote:
diff --git a/net/bluetooth/smp.c b/net/bluetooth/smp.c
index a0ef897..6532689 100644
--- a/net/bluetooth/smp.c
+++ b/net/bluetooth/smp.c
[cut]
@@ -2677,7 +2695,16 @@ static int smp_cmd_public_key(struct l2cap_conn *conn,
struct sk_
Hi, Marcel,
Agreed on all suggestions, I will send a v2 patch set.
Thanks,
ta
Before this change, a new crypto tfm was allocated, each time,
for both key generation and shared secret computation.
Allocate a single tfm for both cases.
Signed-off-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 32 -
net/bluetooth/ecdh_helper.h | 8 --
net
-archive.com/linux-crypto@vger.kernel.org/msg28036.html
Changes in v2:
- add patches 2, 3, 4.
- adress Marcel's suggestions:
- revive the check for accidentally generated debug keys
- bypass the handling of private key to the crypto subsytem,
even when using debug keys.
Tudor Ambar
ned-off-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 32 +++-
net/bluetooth/ecdh_helper.h | 8
net/bluetooth/smp.c | 17 ++---
3 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/net/bluetooth/ecdh_helper.c b/net
tmp buffer contains the swapped private key. In case the setkey call
failed, the tmp buffer was freed without clearing the private key.
Zeroize the temporary buffer so we don't leak the private key.
Signed-off-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 2 +-
1 file chang
Signed-off-by: Tudor Ambarus
---
net/bluetooth/selftest.c | 11 ---
1 file changed, 8 insertions(+), 3 deletions(-)
diff --git a/net/bluetooth/selftest.c b/net/bluetooth/selftest.c
index 126bdc5..ce99648 100644
--- a/net/bluetooth/selftest.c
+++ b/net/bluetooth/selftest.c
@@ -143,7
: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 186
net/bluetooth/ecdh_helper.h | 9 ++-
net/bluetooth/selftest.c| 14 +++-
net/bluetooth/smp.c | 66 +++-
4 files changed, 147 insertions(+), 128 deletions(-)
diff --git a/net
backup logic should be done in crypto, if really needed.
Signed-off-by: Tudor Ambarus
---
net/bluetooth/ecdh_helper.c | 186
net/bluetooth/ecdh_helper.h | 9 ++-
net/bluetooth/selftest.c| 14 +++-
net/bluetooth/smp.c | 66 +++-
4
ECDH_KPP_SECRET_MIN_SIZE and params->key_size are both returning
unsigned values.
Signed-off-by: Tudor Ambarus
---
crypto/ecdh_helper.c | 2 +-
include/crypto/ecdh.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/ecdh_helper.c b/crypto/ecdh_helper.c
index f05b
p->key_size, p->p_size, p->g_size are all of unsigned int type.
Signed-off-by: Tudor Ambarus
---
crypto/dh_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c
index 8ba8a3f..69869da 100644
--- a/crypto/dh_helper.c
+++
Both crypto_kpp_maxsize() and crypto_dh_key_len() are returning
unsigned integers.
Signed-off-by: Tudor Ambarus
---
security/keys/dh.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/security/keys/dh.c b/security/keys/dh.c
index d1ea9f3..89e9255 100644
--- a/security
DH_KPP_SECRET_MIN_SIZE and dh_data_size() are both returning
unsigned values.
Signed-off-by: Tudor Ambarus
---
crypto/dh_helper.c | 2 +-
include/crypto/dh.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/dh_helper.c b/crypto/dh_helper.c
index 69869da..a413b31
Hi, all,
On 08/10/2017 09:39 AM, Stephan Müller wrote:
Hi,
This patch set adds the AF_ALG user space API to externalize the
asymmetric cipher API recently added to the kernel crypto API.
Do we have enough pros and cons so we can decide which interface to use
for exporting akcipher/kpp to user
Hi, David,
On 10/03/2017 12:06 PM, David Howells wrote:
Tudor Ambarus wrote:
-static inline int dh_data_size(const struct dh *p)
+static inline unsigned int dh_data_size(const struct dh *p)
{
return p->key_size + p->p_size + p->g_size;
}
If this is a problem, do you n
Hi, Romain,
On 10/18/2017 04:32 PM, Romain Izard wrote:
my fix also led to a
systematic oops when running the ccm(aes) test case.
The NULL deference appears because of a memory corruption issue.
atmel-aes does not implement ccm(aes), so the algorithm will be in the
following form: ccm_base(at
this empty function along with all the references to it.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/atmel-aes.c | 14 --
drivers/crypto/atmel-tdes.c | 18 --
2 files changed, 32 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
irq would be set to -1 and then unused, if we failed to get IORESOURCE_MEM.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/atmel-aes.c | 2 --
drivers/crypto/atmel-sha.c | 2 --
drivers/crypto/atmel-tdes.c | 2 --
3 files changed, 6 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c b
Return -ENODEV when dma_request_slave_channel_compat() fails.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/atmel-aes.c | 3 +--
drivers/crypto/atmel-sha.c | 3 +--
drivers/crypto/atmel-tdes.c | 3 +--
3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/drivers/crypto/atmel-aes.c
Hi, Romain,
On 10/18/2017 04:32 PM, Romain Izard wrote:
diff --git a/crypto/ccm.c b/crypto/ccm.c
index 1ce37ae0ce56..e7c2121a3ab2 100644
--- a/crypto/ccm.c
+++ b/crypto/ccm.c
@@ -47,6 +47,7 @@ struct crypto_ccm_req_priv_ctx {
u8 odata[16];
u8 idata[16];
u8 auth_tag[16]
Hi, Romain,
On 10/18/2017 04:32 PM, Romain Izard wrote:
diff --git a/drivers/crypto/atmel-aes.c b/drivers/crypto/atmel-aes.c
index 29e20c37f3a6..f3eabe1f1490 100644
--- a/drivers/crypto/atmel-aes.c
+++ b/drivers/crypto/atmel-aes.c
@@ -80,6 +80,7 @@
#define AES_FLAGS_BUSY BIT(3)
#defi
this empty functions along with all the references to them.
Signed-off-by: Tudor Ambarus
---
changes in v2:
- remove empty atmel_aes_gcm_exit()
drivers/crypto/atmel-aes.c | 20
drivers/crypto/atmel-tdes.c | 18 --
2 files changed, 38 deletions(-)
diff --git
Hi, Eric,
On 11/02/2017 12:25 AM, Eric Biggers wrote:
When setting the secret with the software Diffie-Hellman implementation,
if allocating 'g' failed (e.g. if it was longer than
MAX_EXTERN_MPI_BITS), then 'p' was freed twice: once immediately, and
once later when the crypto_kpp tfm was destroy
Hi, Eric,
On 11/02/2017 12:25 AM, Eric Biggers wrote:
If 'p' is 0 for the software Diffie-Hellman implementation, then
dh_max_size() returns 0.
dh_set_secret() returns -EINVAL if p_len < 1536, see
dh_check_params_length(). What am I missing?
Cheers,
ta
ccm_decrypt_done, req);
Reviewed-by: Tudor Ambarus
Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer. The crypto
API checks if this pointer is not NULL before using it, we are safe to
remove the function.
Signed-off-by: Tudor Ambarus
---
crypto/ecdh.c | 6 --
1
Pointer members of an object with static storage duration, if not
explicitly initialized, will be initialized to a NULL pointer.
The crypto API checks if these pointers are not NULL before using them,
therefore we can safely remove these empty functions.
Signed-off-by: Tudor Ambarus
---
changes
sg_set_buf include/linux/scatterlist.h:140 [inline] RSP:
88006c7cfb08
RIP: sg_init_one+0x1b3/0x240 lib/scatterlist.c:156 RSP: 88006c7cfb08
Fixes: 802c7f1c84e4 ("crypto: dh - Add DH software implementation")
Cc: # v4.8+
Signed-off-by: Eric Biggers
Reviewed-by: Tudor Ambarus
4_fastpath+0x1f/0xbe
Fixes: 802c7f1c84e4 ("crypto: dh - Add DH software implementation")
Cc: # v4.8+
Signed-off-by: Eric Biggers
Reviewed-by: Tudor Ambarus
---
crypto/dh.c | 33 +
1 file changed, 13 insertions(+), 20 deletions(-)
diff --git a/c
llowed users to cause a
buffer underflow via KEYCTL_DH_COMPUTE.
Fix this by updating crypto_dh_decode_key() to verify this precondition
for all DH implementations.
Fixes: c9839143ebbf ("crypto: qat - Add DH support")
Cc: # v4.8+
Reviewed-by: Tudor Ambarus
Signed-off-by: Eric Bigge
On 11/06/2017 04:30 AM, Eric Biggers wrote:
From: Eric Biggers
Neither 'p' nor 'g' can be NULL, as they were unpacked using
crypto_dh_decode_key(). And it makes no sense for them to be optional.
So remove the NULL checks that were copy-and-pasted into both modules.
Hi, Romain,
On 10/31/2017 05:25 PM, Romain Izard wrote:
When using the rfc4543(gcm(aes))) mode, the registers of the hardware
engine are not empty after use. If the engine is not reset before its
next use, the following results will be invalid.
Always reset the hardware engine.
Thanks for the
Hi,
On 10/10/2017 01:21 PM, Robert Baronescu wrote:
In case buffer length is a multiple of PAGE_SIZE,
the S/G table is incorrectly generated.
Fix this by handling buflen = k * PAGE_SIZE separately.
Signed-off-by: Robert Baronescu
---
crypto/tcrypt.c | 6 --
1 file changed, 4 insertions(
Hi,
On 11/12/2017 06:26 PM, Horia Geantă wrote:
-sg[0] - (1 entry) reserved for associated data, filled outside
sg_init_aead()
Let's fill the sg[0] with aad inside sg_init_aead()!
Cheers,
ta
Results better code readability.
Signed-off-by: Tudor Ambarus
---
Should be applied after:
crypto: tcrypt - fix S/G table for test_aead_speed()
crypto/tcrypt.c | 16 +---
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index
This patch adds the function scatterwalk_sg_copychunks which writes
a chunk of data from a scatterwalk to another scatterwalk.
It will be used by caam driver to remove the leading zeros of RSA's
algorithm output.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c
Used in caam driver. Export the symbol since the caam driver
can be built as a module.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c | 5 +++--
include/crypto/scatterwalk.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/crypto/scatterwalk.c b/crypto
Add RSA support to caam driver.
Coauthored-by: Yashpal Dutta
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/Kconfig | 13 +
drivers/crypto/caam/Makefile | 13 +
drivers/crypto/caam/caam_rsaprivkey.asn1 | 11 +
drivers/crypto/caam/caam_rsapubkey.asn1 | 4
Add RSA support to caam driver.
Coauthored-by: Yashpal Dutta
Signed-off-by: Tudor Ambarus
---
v2: use kzfree instead of memset with zero and kfree.
drivers/crypto/caam/Kconfig | 13 +
drivers/crypto/caam/Makefile | 13 +
drivers/crypto/caam/caam_rsaprivkey.asn1
Used in caam driver. Export the symbol since the caam driver
can be built as a module.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c | 5 +++--
include/crypto/scatterwalk.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/crypto/scatterwalk.c b/crypto
memcopying to a (null pointer + offset) will result
in memory corruption or undefined behaviour.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c
b
This patch adds the function scatterwalk_sg_copychunks which writes
a chunk of data from a scatterwalk to another scatterwalk.
It will be used by caam driver to remove the leading zeros of RSA's
algorithm output.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c
All RSA implementations can now use the key extract symbols
by selecting CRYPTO_RSA_HELPER.
Signed-off-by: Tudor Ambarus
---
crypto/Kconfig | 8 ++--
crypto/Makefile | 6 +++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/crypto/Kconfig b/crypto/Kconfig
index f6bfdda
Use the RSA's software implementation parser with
raw integer actions.
Compile-tested only.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/qat/Kconfig| 3 +-
drivers/crypto/qat/qat_common/Makefile| 10 +-
drivers/crypto/qat/qat_common/qat_asym_a
tions.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 48 +
crypto/rsa_helper.c | 117 +-
include/crypto/internal/rsa.h | 28 +++---
3 files changed, 130 insertions(+), 63 deletions(-)
diff --git a/crypto/rs
Export rsapubkey_decoder and rsaprivkey_decoder structures,
since they can (will) be used by caam and qat drivers.
Signed-off-by: Tudor Ambarus
---
crypto/rsa_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crypto/rsa_helper.c b/crypto/rsa_helper.c
index 1708db8..14aef69 100644
Signed-off-by: Tudor Ambarus
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c
b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index 8dbbf084..05f49d4 100644
--- a/drivers/crypto
Dedicated to RSA (hardware) implementations that want to use
raw integers instead of MPI keys.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 15
crypto/rsa_helper.c | 158 ++
include/crypto/internal/rsa.h | 24
Add RSA support to caam driver.
Coauthored-by: Yashpal Dutta
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/Kconfig| 12 +
drivers/crypto/caam/Makefile | 4 +
drivers/crypto/caam/caampkc.c | 513 +
drivers/crypto/caam/caampkc.h | 84
ction pointers
to specific actions.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 60 ++-
crypto/rsa_helper.c | 166 --
include/crypto/internal/rsa.h | 31 ++--
3 files changed, 194 insertions(+), 63 deletions(-)
herent_key functions
- export raw_rsa_get_ symbols
Tudor Ambarus (4):
crypto: rsa - generalize ASN.1 sequences
crypto: rsa_helper - add raw integer parser actions
crypto: add CONFIG_ symbol for rsa helper
crypto: rsa_helper - export symbols for asn1 structures
crypto/Kconfig
Dedicated to RSA (hardware) implementations that want to use
raw integers instead of MPI keys.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 15
crypto/rsa_helper.c | 182 ++
include/crypto/internal/rsa.h | 28
Export rsapubkey_decoder and rsaprivkey_decoder structures,
since they can (will) be used by caam and qat drivers.
Signed-off-by: Tudor Ambarus
---
crypto/rsa_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crypto/rsa_helper.c b/crypto/rsa_helper.c
index df1f480..d81a0ec 100644
All RSA implementations can now use the key extract symbols
by selecting CRYPTO_RSA_HELPER.
Signed-off-by: Tudor Ambarus
---
crypto/Kconfig | 8 ++--
crypto/Makefile | 6 +++---
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/crypto/Kconfig b/crypto/Kconfig
index f6bfdda
a_free_key helper function
- fix memory leaks on error path
- rename rsa akcipher_alg struct to caam_rsa
Tudor Ambarus (3):
crypto: scatterwak - Add scatterwalk_sg_copychunks
crypto: scatterwalk - export scatterwalk_pagedone
crypto: caam - add support for RSA algorith
Used in caam driver. Export the symbol since the caam driver
can be built as a module.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c | 5 +++--
include/crypto/scatterwalk.h | 2 ++
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/crypto/scatterwalk.c b/crypto
Add RSA support to caam driver.
Coauthored-by: Yashpal Dutta
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/Kconfig| 12 +
drivers/crypto/caam/Makefile | 4 +
drivers/crypto/caam/caampkc.c | 509 +
drivers/crypto/caam/caampkc.h | 84
This patch adds the function scatterwalk_sg_copychunks which writes
a chunk of data from a scatterwalk to another scatterwalk.
It will be used by caam driver to remove the leading zeros of RSA's
algorithm output.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c
Signed-off-by: Tudor Ambarus
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c
b/drivers/crypto/qat/qat_common/qat_asym_algs.c
index 8dbbf084..05f49d4 100644
--- a/drivers/crypto
Initial patch set can be found here:
http://www.mail-archive.com/linux-crypto@vger.kernel.org/msg18185.html
This patch set is no longer related to the generalized ASN.1 parser.
Tadeusz will remove the ASN.1 parser from qat.
No changes from initial patch set.
Tudor Ambarus (2):
crypto
memcopying to a (null pointer + offset) will result
in memory corruption or undefined behaviour.
Signed-off-by: Tudor Ambarus
---
drivers/crypto/qat/qat_common/qat_asym_algs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/crypto/qat/qat_common/qat_asym_algs.c
b
Dedicated to RSA (hardware) implementations that want to use
raw integers instead of MPI keys.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 15
crypto/rsa_helper.c | 182 ++
include/crypto/internal/rsa.h | 28
ction pointers
to specific actions.
Signed-off-by: Tudor Ambarus
---
crypto/rsa.c | 60 ++-
crypto/rsa_helper.c | 166 --
include/crypto/internal/rsa.h | 31 ++--
3 files changed, 194 insertions(+), 63 deletions(-)
v2 patch set can be found here:
http://www.mail-archive.com/linux-crypto%40vger.kernel.org/msg18269.html
Changes to v2 patch set:
- "crypto: add CONFIG_ symbol for rsa helper"
- removed. The drivers will select the CRYPTO_RSA symbol instead.
Tudor Ambarus (3):
c
This patch adds the function scatterwalk_sg_copychunks which writes
a chunk of data from a scatterwalk to another scatterwalk.
It will be used by caam driver to remove the leading zeros of RSA's
algorithm output.
Signed-off-by: Tudor Ambarus
---
crypto/scatterwalk.c
Export rsapubkey_decoder and rsaprivkey_decoder structures,
since they can (will) be used by caam and qat drivers.
Signed-off-by: Tudor Ambarus
---
crypto/rsa_helper.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crypto/rsa_helper.c b/crypto/rsa_helper.c
index df1f480..d81a0ec 100644
Add RSA support to caam driver.
Coauthored-by: Yashpal Dutta
Signed-off-by: Tudor Ambarus
---
drivers/crypto/caam/Kconfig| 12 +
drivers/crypto/caam/Makefile | 4 +
drivers/crypto/caam/caampkc.c | 509 +
drivers/crypto/caam/caampkc.h | 84
it selects CRYPTO_RSA
Tudor Ambarus (3):
crypto: scatterwak - Add scatterwalk_sg_copychunks
crypto: scatterwalk - export scatterwalk_pagedone
crypto: caam - add support for RSA algorithm
crypto/scatterwalk.c | 31 ++-
drivers/crypto/caam/Kconfig| 12 +
drivers/crypto/caam/Makefi
1 - 100 of 293 matches
Mail list logo