Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1163702 > unrolled thread
| Started by | Stephan Mueller <smueller@chronox.de> |
|---|---|
| First post | 2015-06-12 03:10 +0200 |
| Last post | 2015-06-12 04:50 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH RFC v4 2/4] crypto: add PKE API Stephan Mueller <smueller@chronox.de> - 2015-06-12 03:10 +0200
Re: [PATCH RFC v4 2/4] crypto: add PKE API Herbert Xu <herbert@gondor.apana.org.au> - 2015-06-12 04:50 +0200
Re: [PATCH RFC v4 2/4] crypto: add PKE API Herbert Xu <herbert@gondor.apana.org.au> - 2015-06-12 04:50 +0200
| From | Stephan Mueller <smueller@chronox.de> |
|---|---|
| Date | 2015-06-12 03:10 +0200 |
| Subject | Re: [PATCH RFC v4 2/4] crypto: add PKE API |
| Message-ID | <pAlDQ-6qA-7@gated-at.bofh.it> |
Am Thursday 11 June 2015, 12:05:44 schrieb Tadeusz Struk:
Hi Tadeusz,
>+
>+static int akcipher_clone_key(struct crypto_akcipher *tfm,
>+ const struct public_key *pkey)
>+{
>+ int i, ret = 0;
>+
>+ tfm->pkey = kzalloc(sizeof(*tfm->pkey), GFP_KERNEL);
>+
>+ if (!tfm->pkey)
>+ return -ENOMEM;
>+
>+ for (i = 0; i < ARRAY_SIZE(tfm->pkey->mpi); i++) {
>+ if (!pkey->mpi[i])
>+ continue;
>+
>+ if (mpi_copy(&tfm->pkey->mpi[i], pkey->mpi[i])) {
>+ akcipher_free_key(tfm->pkey);
>+ tfm->pkey = NULL;
>+ ret = -ENOMEM;
>+ break;
>+ }
>+ }
>+ return ret;
>+}
The testmgr code can mark an entire cipher implementation as fips_allowed=1 as
already done for RSA. However, unlike with the other ciphers, that flag must
go in conjunction with the used key sizes.
For FIPS mode, the following restrictions apply:
- RSA: 2048/3072
- DSA: L 2048 / N 224; L 2048 / N 256; L 3072 / N 256
- ECDSA: only the NIST curves
Any other key sizes for the given ciphers is not allowed in FIPS mode.
Should that constraint be considered here?
Ciao
Stephan
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-06-12 04:50 +0200 |
| Message-ID | <pAncB-tp-3@gated-at.bofh.it> |
| In reply to | #1163702 |
On Fri, Jun 12, 2015 at 03:00:42AM +0200, Stephan Mueller wrote: > > The testmgr code can mark an entire cipher implementation as fips_allowed=1 as > already done for RSA. However, unlike with the other ciphers, that flag must > go in conjunction with the used key sizes. > > For FIPS mode, the following restrictions apply: > > - RSA: 2048/3072 > > - DSA: L 2048 / N 224; L 2048 / N 256; L 3072 / N 256 > > - ECDSA: only the NIST curves > > Any other key sizes for the given ciphers is not allowed in FIPS mode. > > Should that constraint be considered here? Yes. However it should be placed into a helper that everybody can call so that future hardware implementations can also make the same checks. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Herbert Xu <herbert@gondor.apana.org.au> |
|---|---|
| Date | 2015-06-12 04:50 +0200 |
| Message-ID | <pAncC-tp-7@gated-at.bofh.it> |
| In reply to | #1163728 |
On Fri, Jun 12, 2015 at 10:42:46AM +0800, Herbert Xu wrote: > On Fri, Jun 12, 2015 at 03:00:42AM +0200, Stephan Mueller wrote: > > > > The testmgr code can mark an entire cipher implementation as fips_allowed=1 as > > already done for RSA. However, unlike with the other ciphers, that flag must > > go in conjunction with the used key sizes. > > > > For FIPS mode, the following restrictions apply: > > > > - RSA: 2048/3072 > > > > - DSA: L 2048 / N 224; L 2048 / N 256; L 3072 / N 256 > > > > - ECDSA: only the NIST curves > > > > Any other key sizes for the given ciphers is not allowed in FIPS mode. > > > > Should that constraint be considered here? > > Yes. However it should be placed into a helper that everybody > can call so that future hardware implementations can also make > the same checks. Ugh I didn't notice this was the generic API setkey function. No it should go into the algorithm-specific setkey function and then be in the form of a helper so that all implementations of that algorithm can call it. Cheers, -- Email: Herbert Xu <herbert@gondor.apana.org.au> Home Page: http://gondor.apana.org.au/~herbert/ PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web