All of lore.kernel.org
 help / color / mirror / Atom feed
* in-kernel user of ecdsa
@ 2018-03-12 17:07 ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-12 17:07 UTC (permalink / raw)
  To: David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	keyrings-u79uwXL29TY76Z2rM5mHXA
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Linux Crypto Mailing List

Hi,

Would you consider using ECDSA in the kernel module signing facility?
When compared with RSA, ECDSA has shorter keys, the key generation
process is faster, the sign operation is faster, but the verify
operation is slower than with RSA.

Smaller key sizes imply reduced memory footprint and bandwidth that are
especially attractive for memory constrained devices. I'm working with
such a device, capable of generating ecc keys, secure key storage and
ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
ecdsa.


ECDSA and RSA comparison
------------------------
-> ECDSA requires a much smaller key length in order to provide the same
security strength as RSA [1]:

Security Strength    RSA (bits)        ECDSA (bits)
112                   2048             224 - 255
128                   3072             256 - 383
192                   7680             384 - 511
256                  15360             512+

7680 and 15360  keys are not included in the NIST standards for
interoperability and efficiency reasons, the keys are just too big.

-> key generation: ECC key generation is faster than IFC (Integer -
Factorization Cryptography). RSA private key is based on large prime
numbers, while for ECDSA any positive integer less than n is a valid
private key.

-> ECDSA sign operations are faster than RSA, but verify operations are
slower. Here's an openssl speed test that I've run on my computer:

                   sign    verify    sign/s verify/s
rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5

                              sign    verify    sign/s verify/s
256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2

Best,
ta

[1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-12 17:07 ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-12 17:07 UTC (permalink / raw)
  To: David Howells, dwmw2, keyrings
  Cc: linux-security-module, tpmdd-devel, Linux Crypto Mailing List,
	bluez mailin list (linux-bluetooth@vger.kernel.org)

Hi,

Would you consider using ECDSA in the kernel module signing facility?
When compared with RSA, ECDSA has shorter keys, the key generation
process is faster, the sign operation is faster, but the verify
operation is slower than with RSA.

Smaller key sizes imply reduced memory footprint and bandwidth that are
especially attractive for memory constrained devices. I'm working with
such a device, capable of generating ecc keys, secure key storage and
ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
ecdsa.


ECDSA and RSA comparison
------------------------
-> ECDSA requires a much smaller key length in order to provide the same
security strength as RSA [1]:

Security Strength    RSA (bits)        ECDSA (bits)
112                   2048             224 - 255
128                   3072             256 - 383
192                   7680             384 - 511
256                  15360             512+

7680 and 15360  keys are not included in the NIST standards for
interoperability and efficiency reasons, the keys are just too big.

-> key generation: ECC key generation is faster than IFC (Integer -
Factorization Cryptography). RSA private key is based on large prime
numbers, while for ECDSA any positive integer less than n is a valid
private key.

-> ECDSA sign operations are faster than RSA, but verify operations are
slower. Here's an openssl speed test that I've run on my computer:

                   sign    verify    sign/s verify/s
rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5

                              sign    verify    sign/s verify/s
256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2

Best,
ta

[1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-12 17:07 ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-12 17:07 UTC (permalink / raw)
  To: David Howells, dwmw2, keyrings
  Cc: linux-security-module, tpmdd-devel, Linux Crypto Mailing List,
	bluez mailin list (linux-bluetooth@vger.kernel.org)

Hi,

Would you consider using ECDSA in the kernel module signing facility?
When compared with RSA, ECDSA has shorter keys, the key generation
process is faster, the sign operation is faster, but the verify
operation is slower than with RSA.

Smaller key sizes imply reduced memory footprint and bandwidth that are
especially attractive for memory constrained devices. I'm working with
such a device, capable of generating ecc keys, secure key storage and
ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
ecdsa.


ECDSA and RSA comparison
------------------------
-> ECDSA requires a much smaller key length in order to provide the same
security strength as RSA [1]:

Security Strength    RSA (bits)        ECDSA (bits)
112                   2048             224 - 255
128                   3072             256 - 383
192                   7680             384 - 511
256                  15360             512+

7680 and 15360  keys are not included in the NIST standards for
interoperability and efficiency reasons, the keys are just too big.

-> key generation: ECC key generation is faster than IFC (Integer -
Factorization Cryptography). RSA private key is based on large prime
numbers, while for ECDSA any positive integer less than n is a valid
private key.

-> ECDSA sign operations are faster than RSA, but verify operations are
slower. Here's an openssl speed test that I've run on my computer:

                   sign    verify    sign/s verify/s
rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5

                              sign    verify    sign/s verify/s
256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2

Best,
ta

[1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-12 17:07 ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-12 17:07 UTC (permalink / raw)
  To: linux-security-module

Hi,

Would you consider using ECDSA in the kernel module signing facility?
When compared with RSA, ECDSA has shorter keys, the key generation
process is faster, the sign operation is faster, but the verify
operation is slower than with RSA.

Smaller key sizes imply reduced memory footprint and bandwidth that are
especially attractive for memory constrained devices. I'm working with
such a device, capable of generating ecc keys, secure key storage and
ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
ecdsa.


ECDSA and RSA comparison
------------------------
-> ECDSA requires a much smaller key length in order to provide the same
security strength as RSA [1]:

Security Strength    RSA (bits)        ECDSA (bits)
112                   2048             224 - 255
128                   3072             256 - 383
192                   7680             384 - 511
256                  15360             512+

7680 and 15360  keys are not included in the NIST standards for
interoperability and efficiency reasons, the keys are just too big.

-> key generation: ECC key generation is faster than IFC (Integer -
Factorization Cryptography). RSA private key is based on large prime
numbers, while for ECDSA any positive integer less than n is a valid
private key.

-> ECDSA sign operations are faster than RSA, but verify operations are
slower. Here's an openssl speed test that I've run on my computer:

                   sign    verify    sign/s verify/s
rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5

                              sign    verify    sign/s verify/s
256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2

Best,
ta

[1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-12 17:07 ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-12 17:07 UTC (permalink / raw)
  To: David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	keyrings-u79uwXL29TY76Z2rM5mHXA
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Linux Crypto Mailing List

Hi,

Would you consider using ECDSA in the kernel module signing facility?
When compared with RSA, ECDSA has shorter keys, the key generation
process is faster, the sign operation is faster, but the verify
operation is slower than with RSA.

Smaller key sizes imply reduced memory footprint and bandwidth that are
especially attractive for memory constrained devices. I'm working with
such a device, capable of generating ecc keys, secure key storage and
ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
ecdsa.


ECDSA and RSA comparison
------------------------
-> ECDSA requires a much smaller key length in order to provide the same
security strength as RSA [1]:

Security Strength    RSA (bits)        ECDSA (bits)
112                   2048             224 - 255
128                   3072             256 - 383
192                   7680             384 - 511
256                  15360             512+

7680 and 15360  keys are not included in the NIST standards for
interoperability and efficiency reasons, the keys are just too big.

-> key generation: ECC key generation is faster than IFC (Integer -
Factorization Cryptography). RSA private key is based on large prime
numbers, while for ECDSA any positive integer less than n is a valid
private key.

-> ECDSA sign operations are faster than RSA, but verify operations are
slower. Here's an openssl speed test that I've run on my computer:

                   sign    verify    sign/s verify/s
rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5

                              sign    verify    sign/s verify/s
256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2

Best,
ta

[1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
  2018-03-12 17:07 ` Tudor Ambarus
                       ` (2 preceding siblings ...)
  (?)
@ 2018-03-12 18:09     ` James Bottomley
  -1 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 18:09 UTC (permalink / raw)
  To: Tudor Ambarus, David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	keyrings-u79uwXL29TY76Z2rM5mHXA
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	keyrings-u79uwXL29TY76Z2rM5mHXA, Linux Crypto Mailing List

On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> Hi,
> 
> Would you consider using ECDSA in the kernel module signing facility?
> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.

You missed the keyrings list, which is where the module signing utility
is discussed.

First question is, have you actually tried?  It looks like sign-file
doesn't do anything RSA specific so if you give it an EC X.509
certificate it will produce an ECDSA signature.

I think our kernel internal x509 parsers don't have the EC OIDs, so
signature verification will fail; but, especially since we have the
rest of the EC machinery in the crypto subsystem, that looks to be
simply fixable.

James


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 18:09     ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 18:09 UTC (permalink / raw)
  To: Tudor Ambarus, David Howells, dwmw2, keyrings
  Cc: bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> Hi,
> 
> Would you consider using ECDSA in the kernel module signing facility?
> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.

You missed the keyrings list, which is where the module signing utility
is discussed.

First question is, have you actually tried?  It looks like sign-file
doesn't do anything RSA specific so if you give it an EC X.509
certificate it will produce an ECDSA signature.

I think our kernel internal x509 parsers don't have the EC OIDs, so
signature verification will fail; but, especially since we have the
rest of the EC machinery in the crypto subsystem, that looks to be
simply fixable.

James

--
To unsubscribe from this list: send the line "unsubscribe keyrings" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 18:09     ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 18:09 UTC (permalink / raw)
  To: Tudor Ambarus, David Howells, dwmw2, keyrings
  Cc: bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List,
	keyrings

On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> Hi,
> 
> Would you consider using ECDSA in the kernel module signing facility?
> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.

You missed the keyrings list, which is where the module signing utility
is discussed.

First question is, have you actually tried?  It looks like sign-file
doesn't do anything RSA specific so if you give it an EC X.509
certificate it will produce an ECDSA signature.

I think our kernel internal x509 parsers don't have the EC OIDs, so
signature verification will fail; but, especially since we have the
rest of the EC machinery in the crypto subsystem, that looks to be
simply fixable.

James

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 18:09     ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 18:09 UTC (permalink / raw)
  To: linux-security-module

On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> Hi,
> 
> Would you consider using ECDSA in the kernel module signing facility?
> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.

You missed the keyrings list, which is where the module signing utility
is discussed.

First question is, have you actually tried? ?It looks like sign-file
doesn't do anything RSA specific so if you give it an EC X.509
certificate it will produce an ECDSA signature.

I think our kernel internal x509 parsers don't have the EC OIDs, so
signature verification will fail; but, especially since we have the
rest of the EC machinery in the crypto subsystem, that looks to be
simply fixable.

James

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
@ 2018-03-12 18:09     ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 18:09 UTC (permalink / raw)
  To: Tudor Ambarus, David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	keyrings-u79uwXL29TY76Z2rM5mHXA, Linux Crypto Mailing List

On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> Hi,
> 
> Would you consider using ECDSA in the kernel module signing facility?
> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.

You missed the keyrings list, which is where the module signing utility
is discussed.

First question is, have you actually tried?  It looks like sign-file
doesn't do anything RSA specific so if you give it an EC X.509
certificate it will produce an ECDSA signature.

I think our kernel internal x509 parsers don't have the EC OIDs, so
signature verification will fail; but, especially since we have the
rest of the EC machinery in the crypto subsystem, that looks to be
simply fixable.

James


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
  2018-03-12 18:09     ` James Bottomley
  (?)
@ 2018-03-12 19:56       ` Stephan Mueller
  -1 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 19:56 UTC (permalink / raw)
  To: James Bottomley
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:

Hi James,

> On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > Hi,
> > 
> > Would you consider using ECDSA in the kernel module signing facility?
> > When compared with RSA, ECDSA has shorter keys, the key generation
> > process is faster, the sign operation is faster, but the verify
> > operation is slower than with RSA.
> 
> You missed the keyrings list, which is where the module signing utility
> is discussed.
> 
> First question is, have you actually tried?  It looks like sign-file
> doesn't do anything RSA specific so if you give it an EC X.509
> certificate it will produce an ECDSA signature.
> 
> I think our kernel internal x509 parsers don't have the EC OIDs, so
> signature verification will fail; but, especially since we have the
> rest of the EC machinery in the crypto subsystem, that looks to be
> simply fixable.

ECDSA is not implemented currently in the kernel crypto API.
> 
> James



Ciao
Stephan



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 19:56       ` Stephan Mueller
  0 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 19:56 UTC (permalink / raw)
  To: James Bottomley
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:

Hi James,

> On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > Hi,
> > 
> > Would you consider using ECDSA in the kernel module signing facility?
> > When compared with RSA, ECDSA has shorter keys, the key generation
> > process is faster, the sign operation is faster, but the verify
> > operation is slower than with RSA.
> 
> You missed the keyrings list, which is where the module signing utility
> is discussed.
> 
> First question is, have you actually tried?  It looks like sign-file
> doesn't do anything RSA specific so if you give it an EC X.509
> certificate it will produce an ECDSA signature.
> 
> I think our kernel internal x509 parsers don't have the EC OIDs, so
> signature verification will fail; but, especially since we have the
> rest of the EC machinery in the crypto subsystem, that looks to be
> simply fixable.

ECDSA is not implemented currently in the kernel crypto API.
> 
> James



Ciao
Stephan

^ permalink raw reply	[flat|nested] 27+ messages in thread

* [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 19:56       ` Stephan Mueller
  0 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 19:56 UTC (permalink / raw)
  To: linux-security-module

Am Montag, 12. M?rz 2018, 19:09:18 CET schrieb James Bottomley:

Hi James,

> On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > Hi,
> > 
> > Would you consider using ECDSA in the kernel module signing facility?
> > When compared with RSA, ECDSA has shorter keys, the key generation
> > process is faster, the sign operation is faster, but the verify
> > operation is slower than with RSA.
> 
> You missed the keyrings list, which is where the module signing utility
> is discussed.
> 
> First question is, have you actually tried?  It looks like sign-file
> doesn't do anything RSA specific so if you give it an EC X.509
> certificate it will produce an ECDSA signature.
> 
> I think our kernel internal x509 parsers don't have the EC OIDs, so
> signature verification will fail; but, especially since we have the
> rest of the EC machinery in the crypto subsystem, that looks to be
> simply fixable.

ECDSA is not implemented currently in the kernel crypto API.
> 
> James



Ciao
Stephan


--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
  2018-03-12 19:56       ` Stephan Mueller
                             ` (2 preceding siblings ...)
  (?)
@ 2018-03-12 21:55           ` James Bottomley
  -1 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 21:55 UTC (permalink / raw)
  To: Stephan Mueller
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, David Howells,
	bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	keyrings-u79uwXL29TY76Z2rM5mHXA, Linux Crypto Mailing List,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ

On Mon, 2018-03-12 at 20:56 +0100, Stephan Mueller wrote:
> Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:
> 
> Hi James,
> 
> > 
> > On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > > 
> > > Hi,
> > > 
> > > Would you consider using ECDSA in the kernel module signing
> > > facility? When compared with RSA, ECDSA has shorter keys, the key
> > > generation process is faster, the sign operation is faster, but
> > > the verify operation is slower than with RSA.
> > 
> > You missed the keyrings list, which is where the module signing
> > utility is discussed.
> > 
> > First question is, have you actually tried?  It looks like sign-
> > file doesn't do anything RSA specific so if you give it an EC X.509
> > certificate it will produce an ECDSA signature.
> > 
> > I think our kernel internal x509 parsers don't have the EC OIDs, so
> > signature verification will fail; but, especially since we have the
> > rest of the EC machinery in the crypto subsystem, that looks to be
> > simply fixable.
> 
> ECDSA is not implemented currently in the kernel crypto API.

an ECDSA signature is produced as a ECDH operation using the DSA
algorithm instead of KDFe, so it's trivial with what we have; signature
verification involves a separate point addition but we have all the
primitives for this in crypto/ecc.c so adding it isn't really
difficult, is it?

James


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 21:55           ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 21:55 UTC (permalink / raw)
  To: Stephan Mueller
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

On Mon, 2018-03-12 at 20:56 +0100, Stephan Mueller wrote:
> Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:
> 
> Hi James,
> 
> > 
> > On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > > 
> > > Hi,
> > > 
> > > Would you consider using ECDSA in the kernel module signing
> > > facility? When compared with RSA, ECDSA has shorter keys, the key
> > > generation process is faster, the sign operation is faster, but
> > > the verify operation is slower than with RSA.
> > 
> > You missed the keyrings list, which is where the module signing
> > utility is discussed.
> > 
> > First question is, have you actually tried?  It looks like sign-
> > file doesn't do anything RSA specific so if you give it an EC X.509
> > certificate it will produce an ECDSA signature.
> > 
> > I think our kernel internal x509 parsers don't have the EC OIDs, so
> > signature verification will fail; but, especially since we have the
> > rest of the EC machinery in the crypto subsystem, that looks to be
> > simply fixable.
> 
> ECDSA is not implemented currently in the kernel crypto API.

an ECDSA signature is produced as a ECDH operation using the DSA
algorithm instead of KDFe, so it's trivial with what we have; signature
verification involves a separate point addition but we have all the
primitives for this in crypto/ecc.c so adding it isn't really
difficult, is it?

James


^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 21:55           ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 21:55 UTC (permalink / raw)
  To: Stephan Mueller
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

On Mon, 2018-03-12 at 20:56 +0100, Stephan Mueller wrote:
> Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:
> 
> Hi James,
> 
> > 
> > On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > > 
> > > Hi,
> > > 
> > > Would you consider using ECDSA in the kernel module signing
> > > facility? When compared with RSA, ECDSA has shorter keys, the key
> > > generation process is faster, the sign operation is faster, but
> > > the verify operation is slower than with RSA.
> > 
> > You missed the keyrings list, which is where the module signing
> > utility is discussed.
> > 
> > First question is, have you actually tried?  It looks like sign-
> > file doesn't do anything RSA specific so if you give it an EC X.509
> > certificate it will produce an ECDSA signature.
> > 
> > I think our kernel internal x509 parsers don't have the EC OIDs, so
> > signature verification will fail; but, especially since we have the
> > rest of the EC machinery in the crypto subsystem, that looks to be
> > simply fixable.
> 
> ECDSA is not implemented currently in the kernel crypto API.

an ECDSA signature is produced as a ECDH operation using the DSA
algorithm instead of KDFe, so it's trivial with what we have; signature
verification involves a separate point addition but we have all the
primitives for this in crypto/ecc.c so adding it isn't really
difficult, is it?

James


^ permalink raw reply	[flat|nested] 27+ messages in thread

* [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 21:55           ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 21:55 UTC (permalink / raw)
  To: linux-security-module

On Mon, 2018-03-12 at 20:56 +0100, Stephan Mueller wrote:
> Am Montag, 12. M?rz 2018, 19:09:18 CET schrieb James Bottomley:
> 
> Hi James,
> 
> > 
> > On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > > 
> > > Hi,
> > > 
> > > Would you consider using ECDSA in the kernel module signing
> > > facility? When compared with RSA, ECDSA has shorter keys, the key
> > > generation process is faster, the sign operation is faster, but
> > > the verify operation is slower than with RSA.
> > 
> > You missed the keyrings list, which is where the module signing
> > utility is discussed.
> > 
> > First question is, have you actually tried???It looks like sign-
> > file doesn't do anything RSA specific so if you give it an EC X.509
> > certificate it will produce an ECDSA signature.
> > 
> > I think our kernel internal x509 parsers don't have the EC OIDs, so
> > signature verification will fail; but, especially since we have the
> > rest of the EC machinery in the crypto subsystem, that looks to be
> > simply fixable.
> 
> ECDSA is not implemented currently in the kernel crypto API.

an ECDSA signature is produced as a ECDH operation using the DSA
algorithm instead of KDFe, so it's trivial with what we have; signature
verification involves a separate point addition but we have all the
primitives for this in crypto/ecc.c so adding it isn't really
difficult, is it?

James

--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
@ 2018-03-12 21:55           ` James Bottomley
  0 siblings, 0 replies; 27+ messages in thread
From: James Bottomley @ 2018-03-12 21:55 UTC (permalink / raw)
  To: Stephan Mueller
  Cc: tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f, David Howells,
	bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	keyrings-u79uwXL29TY76Z2rM5mHXA, Linux Crypto Mailing List,
	dwmw2-wEGCiKHe2LqWVfeAwA7xHQ

On Mon, 2018-03-12 at 20:56 +0100, Stephan Mueller wrote:
> Am Montag, 12. März 2018, 19:09:18 CET schrieb James Bottomley:
> 
> Hi James,
> 
> > 
> > On Mon, 2018-03-12 at 19:07 +0200, Tudor Ambarus wrote:
> > > 
> > > Hi,
> > > 
> > > Would you consider using ECDSA in the kernel module signing
> > > facility? When compared with RSA, ECDSA has shorter keys, the key
> > > generation process is faster, the sign operation is faster, but
> > > the verify operation is slower than with RSA.
> > 
> > You missed the keyrings list, which is where the module signing
> > utility is discussed.
> > 
> > First question is, have you actually tried?  It looks like sign-
> > file doesn't do anything RSA specific so if you give it an EC X.509
> > certificate it will produce an ECDSA signature.
> > 
> > I think our kernel internal x509 parsers don't have the EC OIDs, so
> > signature verification will fail; but, especially since we have the
> > rest of the EC machinery in the crypto subsystem, that looks to be
> > simply fixable.
> 
> ECDSA is not implemented currently in the kernel crypto API.

an ECDSA signature is produced as a ECDH operation using the DSA
algorithm instead of KDFe, so it's trivial with what we have; signature
verification involves a separate point addition but we have all the
primitives for this in crypto/ecc.c so adding it isn't really
difficult, is it?

James


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
tpmdd-devel mailing list
tpmdd-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tpmdd-devel

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
  2018-03-12 21:55           ` James Bottomley
  (?)
@ 2018-03-12 21:57             ` Stephan Mueller
  -1 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 21:57 UTC (permalink / raw)
  To: James Bottomley
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

Am Montag, 12. März 2018, 22:55:35 CET schrieb James Bottomley:

Hi James,

> > ECDSA is not implemented currently in the kernel crypto API.
> 
> an ECDSA signature is produced as a ECDH operation using the DSA
> algorithm instead of KDFe, so it's trivial with what we have; signature
> verification involves a separate point addition but we have all the
> primitives for this in crypto/ecc.c so adding it isn't really
> difficult, is it?

No, it is not. There even was a patch posted about a year ago to add ECDSA. 
But it was rejected due to missing in-kernel users. I guess that patch could 
be reactivated.

Ciao
Stephan



^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 21:57             ` Stephan Mueller
  0 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 21:57 UTC (permalink / raw)
  To: James Bottomley
  Cc: Tudor Ambarus, David Howells, dwmw2, keyrings,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-security-module, tpmdd-devel, Linux Crypto Mailing List

Am Montag, 12. M=E4rz 2018, 22:55:35 CET schrieb James Bottomley:

Hi James,

> > ECDSA is not implemented currently in the kernel crypto API.
>=20
> an ECDSA signature is produced as a ECDH operation using the DSA
> algorithm instead of KDFe, so it's trivial with what we have; signature
> verification involves a separate point addition but we have all the
> primitives for this in crypto/ecc.c so adding it isn't really
> difficult, is it?

No, it is not. There even was a patch posted about a year ago to add ECDSA.=
=20
But it was rejected due to missing in-kernel users. I guess that patch coul=
d=20
be reactivated.

Ciao
Stephan



^ permalink raw reply	[flat|nested] 27+ messages in thread

* [tpmdd-devel] in-kernel user of ecdsa
@ 2018-03-12 21:57             ` Stephan Mueller
  0 siblings, 0 replies; 27+ messages in thread
From: Stephan Mueller @ 2018-03-12 21:57 UTC (permalink / raw)
  To: linux-security-module

Am Montag, 12. M?rz 2018, 22:55:35 CET schrieb James Bottomley:

Hi James,

> > ECDSA is not implemented currently in the kernel crypto API.
> 
> an ECDSA signature is produced as a ECDH operation using the DSA
> algorithm instead of KDFe, so it's trivial with what we have; signature
> verification involves a separate point addition but we have all the
> primitives for this in crypto/ecc.c so adding it isn't really
> difficult, is it?

No, it is not. There even was a patch posted about a year ago to add ECDSA. 
But it was rejected due to missing in-kernel users. I guess that patch could 
be reactivated.

Ciao
Stephan


--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
  2018-03-12 17:07 ` Tudor Ambarus
                       ` (3 preceding siblings ...)
  (?)
@ 2018-03-26 14:59     ` Tudor Ambarus
  -1 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	keyrings-u79uwXL29TY76Z2rM5mHXA
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Linux Crypto Mailing List, linux-arm-kernel



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
@ 2018-03-26 14:59     ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: linux-arm-kernel



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
@ 2018-03-26 14:59     ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: David Howells, dwmw2, keyrings
  Cc: linux-security-module, tpmdd-devel, Linux Crypto Mailing List,
	bluez mailin list (linux-bluetooth@vger.kernel.org),
	linux-arm-kernel



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-26 14:59     ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: linux-security-module



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 27+ messages in thread

* in-kernel user of ecdsa
@ 2018-03-26 14:59     ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: linux-arm-kernel



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo at vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 27+ messages in thread

* Re: in-kernel user of ecdsa
@ 2018-03-26 14:59     ` Tudor Ambarus
  0 siblings, 0 replies; 27+ messages in thread
From: Tudor Ambarus @ 2018-03-26 14:59 UTC (permalink / raw)
  To: David Howells, dwmw2-wEGCiKHe2LqWVfeAwA7xHQ,
	keyrings-u79uwXL29TY76Z2rM5mHXA
  Cc: bluez mailin list
	(linux-bluetooth-u79uwXL29TY76Z2rM5mHXA@public.gmane.org),
	linux-security-module-u79uwXL29TY76Z2rM5mHXA,
	tpmdd-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f,
	Linux Crypto Mailing List, linux-arm-kernel



On 03/12/2018 07:07 PM, Tudor Ambarus wrote:

> Would you consider using ECDSA in the kernel module signing facility?

Any feedback is good. I can invest some time to make this happen, if
needed.

> When compared with RSA, ECDSA has shorter keys, the key generation
> process is faster, the sign operation is faster, but the verify
> operation is slower than with RSA.
> 
> Smaller key sizes imply reduced memory footprint and bandwidth that are
> especially attractive for memory constrained devices. I'm working with
> such a device, capable of generating ecc keys, secure key storage and
> ecdsa/ecdh crypto acceleration. I'm trying to find an in-kernel user of
> ecdsa.
> 
> 
> ECDSA and RSA comparison
> ------------------------
> -> ECDSA requires a much smaller key length in order to provide the same
> security strength as RSA [1]:
> 
> Security Strength    RSA (bits)        ECDSA (bits)
> 112                   2048             224 - 255
> 128                   3072             256 - 383
> 192                   7680             384 - 511
> 256                  15360             512+
> 
> 7680 and 15360  keys are not included in the NIST standards for
> interoperability and efficiency reasons, the keys are just too big.
> 
> -> key generation: ECC key generation is faster than IFC (Integer -
> Factorization Cryptography). RSA private key is based on large prime
> numbers, while for ECDSA any positive integer less than n is a valid
> private key.
> 
> -> ECDSA sign operations are faster than RSA, but verify operations are
> slower. Here's an openssl speed test that I've run on my computer:
> 
>                    sign    verify    sign/s verify/s
> rsa 2048 bits 0.000604s 0.000018s   1656.3  56813.7
> rsa 4096 bits 0.004027s 0.000062s    248.3  16052.5
> 
>                               sign    verify    sign/s verify/s
> 256 bit ecdsa (nistp256)   0.0000s   0.0001s  28986.4  13516.3
> 384 bit ecdsa (nistp384)   0.0002s   0.0008s   5541.0   1322.2
> 521 bit ecdsa (nistp521)   0.0003s   0.0006s   3104.2   1756.2
> 
> Best,
> ta
> 
> [1] NIST SP 800-57 Pt. 1 Rev. 4, Recommendation for key management
> -- 
> To unsubscribe from this list: send the line "unsubscribe keyrings" in
> the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot

^ permalink raw reply	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2018-03-26 14:59 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-12 17:07 in-kernel user of ecdsa Tudor Ambarus
2018-03-12 17:07 ` Tudor Ambarus
2018-03-12 17:07 ` Tudor Ambarus
2018-03-12 17:07 ` Tudor Ambarus
2018-03-12 17:07 ` Tudor Ambarus
     [not found] ` <0f698592-8ade-14d4-7891-1c35501c6285-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
2018-03-12 18:09   ` James Bottomley
2018-03-12 18:09     ` James Bottomley
2018-03-12 18:09     ` [tpmdd-devel] " James Bottomley
2018-03-12 18:09     ` James Bottomley
2018-03-12 18:09     ` James Bottomley
2018-03-12 19:56     ` Stephan Mueller
2018-03-12 19:56       ` Stephan Mueller
2018-03-12 19:56       ` Stephan Mueller
     [not found]       ` <31045526.HZb3ddfbbg-b2PLbiJbNv8ftSvlWXw0+g@public.gmane.org>
2018-03-12 21:55         ` James Bottomley
2018-03-12 21:55           ` James Bottomley
2018-03-12 21:55           ` [tpmdd-devel] " James Bottomley
2018-03-12 21:55           ` James Bottomley
2018-03-12 21:55           ` James Bottomley
2018-03-12 21:57           ` Stephan Mueller
2018-03-12 21:57             ` Stephan Mueller
2018-03-12 21:57             ` Stephan Mueller
2018-03-26 14:59   ` Tudor Ambarus
2018-03-26 14:59     ` Tudor Ambarus
2018-03-26 14:59     ` Tudor Ambarus
2018-03-26 14:59     ` Tudor Ambarus
2018-03-26 14:59     ` Tudor Ambarus
2018-03-26 14:59     ` Tudor Ambarus

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.