RE: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-22 Thread Indan Zupancic
(Please don't trim me from the CC list if you're replying to what I've said, thanks.) On Thu, March 22, 2007 00:31, David Schwartz wrote: >> If you can't read protect your kernel, you can't write protect it >> either. > > This is so misleading as to basically be false. Please elaborate. Short of

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-22 Thread Tasos Parisinos
On Wed, March 21, 2007 16:50, Tasos Parisinos wrote: A malicious person may want to alter code on the detachable (and unsafe) file system. Lots of stuff including the kernel will be in a trapped casing (opening, probing it, power analyzing it, heating it etc will result in system suicide

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-22 Thread Tasos Parisinos
On Wed, March 21, 2007 16:50, Tasos Parisinos wrote: A malicious person may want to alter code on the detachable (and unsafe) file system. Lots of stuff including the kernel will be in a trapped casing (opening, probing it, power analyzing it, heating it etc will result in system suicide

RE: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-22 Thread Indan Zupancic
(Please don't trim me from the CC list if you're replying to what I've said, thanks.) On Thu, March 22, 2007 00:31, David Schwartz wrote: If you can't read protect your kernel, you can't write protect it either. This is so misleading as to basically be false. Please elaborate. Short of ROM I

RE: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread David Schwartz
> If you can't read protect your kernel, you can't write protect it > either. This is so misleading as to basically be false. It is true that any security scheme that can prevent people from taking money out of my account can also prevent people from putting money in. However, the set of people

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 16:50, Tasos Parisinos wrote: > A malicious person may want to alter code on the detachable (and unsafe) > file system. > Lots of stuff including the kernel will be in a trapped casing (opening, > probing it, power > analyzing it, heating it etc will result in system suicide

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
I agree that you have no more security that using symmetric but we believe you have lower costs, simpler key management (which is a big headache alone), tougher to break through (not unbreakable) and more centralization It depends a bit on who you want to give control over what can and

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 15:31, Tasos Parisinos wrote: > Indan Zupancic wrote: >> On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: >>> How can one tamper (write) the kernel memory of a booted and running kernel >>> without using an exploitable bug? >>> >>> I mean, you can't mess with the bzImage

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
on the previous message the exponent is not 32 bits but 64 bits, sorry - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Indan Zupancic wrote: On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: > >> On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: >> >>> Protecting a TripleDES key in high security standards is not as >>> simple as making the kernel read >>> protected, you need a whole lot and >>> that also means hardware

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this overhead when you use

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 13:34, Tasos Parisinos wrote: > Indan Zupancic wrote: >>> Protecting a TripleDES key in high security standards is not as simple as >>> making the kernel >>> read protected, you need a whole lot and that also means hardware >>> (cryptomemories e.t.c) >>> So you forget

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: > Protecting a TripleDES key in high security standards is not as > simple as making the kernel read > protected, you need a whole lot and > that also means hardware (cryptomemories e.t.c) > So you forget about all this overhead when you use

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Indan Zupancic wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this overhead when you use assymetric You need to protect

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: >> Assuming you have a secure kernel binary that is tamper proof, why do you >> need >> slow and complex asymmetric encryption again? If you can write protect the >> kernel, >> you can also read protect it (or let the boot loader pass the key

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Assuming you have a secure kernel binary that is tamper proof, why do you need slow and complex asymmetric encryption again? If you can write protect the kernel, you can also read protect it (or let the boot loader pass the key to the kernel). So what stops you from using a simple symmetric key

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Assuming you have a secure kernel binary that is tamper proof, why do you need slow and complex asymmetric encryption again? If you can write protect the kernel, you can also read protect it (or let the boot loader pass the key to the kernel). So what stops you from using a simple symmetric key

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Assuming you have a secure kernel binary that is tamper proof, why do you need slow and complex asymmetric encryption again? If you can write protect the kernel, you can also read protect it (or let the boot loader pass the key to the

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Indan Zupancic wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this overhead when you use assymetric You need to protect

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this overhead when you use

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 13:34, Tasos Parisinos wrote: Indan Zupancic wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So you forget about all this overhead when you use

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means hardware (cryptomemories e.t.c) So

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
Indan Zupancic wrote: On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: On Wed, March 21, 2007 10:15, Tasos Parisinos wrote: Protecting a TripleDES key in high security standards is not as simple as making the kernel read protected, you need a whole lot and that also means

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
on the previous message the exponent is not 32 bits but 64 bits, sorry - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 15:31, Tasos Parisinos wrote: Indan Zupancic wrote: On Wed, March 21, 2007 14:07, Tasos Parisinos wrote: How can one tamper (write) the kernel memory of a booted and running kernel without using an exploitable bug? I mean, you can't mess with the bzImage on flash, the

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Tasos Parisinos
I agree that you have no more security that using symmetric but we believe you have lower costs, simpler key management (which is a big headache alone), tougher to break through (not unbreakable) and more centralization It depends a bit on who you want to give control over what can and

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread Indan Zupancic
On Wed, March 21, 2007 16:50, Tasos Parisinos wrote: A malicious person may want to alter code on the detachable (and unsafe) file system. Lots of stuff including the kernel will be in a trapped casing (opening, probing it, power analyzing it, heating it etc will result in system suicide and

RE: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-21 Thread David Schwartz
If you can't read protect your kernel, you can't write protect it either. This is so misleading as to basically be false. It is true that any security scheme that can prevent people from taking money out of my account can also prevent people from putting money in. However, the set of people I

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Indan Zupancic
On Tue, March 20, 2007 15:11, Tasos Parisinos wrote: > Francois Romieu wrote: > >> RSA is slow. syscalls are fast. >> >> Which part of the kernel is supposed to benefit from this code ? > > The main purpose behind the development of this module was to create an > in-kernel > system of signed

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Jan Engelhardt
On Mar 20 2007 10:15, Matt Mackall wrote: >On Tue, Mar 20, 2007 at 04:44:01PM +0200, Tasos Parisinos wrote: >> >>+/* Pre-allocate some auxilliary mpis */ >> >>+rsa_echo("Preallocating %lu bytes for auxilliary operands\n", >> >>+ RSA_AUX_SIZE * RSA_AUX_COUNT * sizeof(_u32)); >> >

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Paulo Marques
Matt Mackall wrote: [...] +/* Allocate space for the mpi and its data */ +s = (size / 4) + ((size % 4)? 1: 0); Uhhh.. (size + 1) / 4? You mean "(size + 3) / 4", no? Overall, I agree with your comments: this file looks like it needs a lot more CodingStyle ;) Redefining standard

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Ok, from what i read, there are many-many similarities in objective but i think that i take a different aproach in the solution This is a mod for modular exponentiation only, and this is specific and simple, cut-down and (as much as possible) overhead free. I don't use gpg structs and /or other

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Matt Mackall
On Tue, Mar 20, 2007 at 04:44:01PM +0200, Tasos Parisinos wrote: > >>+/* Pre-allocate some auxilliary mpis */ > >>+rsa_echo("Preallocating %lu bytes for auxilliary operands\n", > >>+ RSA_AUX_SIZE * RSA_AUX_COUNT * sizeof(_u32)); > > > >And printk. > > i made such a printk wrapper

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread James Morris
On Tue, 20 Mar 2007, Tasos Parisinos wrote: > The main purpose behind the development of this module was to create an > in-kernel system of signed modules. I suggest you read this thread: http://lkml.org/lkml/2007/2/14/164 -- James Morris <[EMAIL PROTECTED]> - To unsubscribe from this list:

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Thanks for your comments On Mon, Mar 19, 2007 at 06:22:15PM +0200, Tasos Parisinos wrote: +static inline _i32 rsa_max(_i32 x, _i32 y) +{ +return (x > y)? x: y; +} We've got a max() already. Use tabs. This is right, will be fixed, just hate discipline + +/* + * Module loading

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Francois Romieu wrote: RSA is slow. syscalls are fast. Which part of the kernel is supposed to benefit from this code ? The main purpose behind the development of this module was to create an in-kernel system of signed modules. The scenario applies most in embedded systems that are running

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Francois Romieu wrote: RSA is slow. syscalls are fast. Which part of the kernel is supposed to benefit from this code ? The main purpose behind the development of this module was to create an in-kernel system of signed modules. The scenario applies most in embedded systems that are running

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Thanks for your comments On Mon, Mar 19, 2007 at 06:22:15PM +0200, Tasos Parisinos wrote: +static inline _i32 rsa_max(_i32 x, _i32 y) +{ +return (x y)? x: y; +} We've got a max() already. Use tabs. This is right, will be fixed, just hate discipline + +/* + * Module loading callback

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread James Morris
On Tue, 20 Mar 2007, Tasos Parisinos wrote: The main purpose behind the development of this module was to create an in-kernel system of signed modules. I suggest you read this thread: http://lkml.org/lkml/2007/2/14/164 -- James Morris [EMAIL PROTECTED] - To unsubscribe from this list: send

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Matt Mackall
On Tue, Mar 20, 2007 at 04:44:01PM +0200, Tasos Parisinos wrote: +/* Pre-allocate some auxilliary mpis */ +rsa_echo(Preallocating %lu bytes for auxilliary operands\n, + RSA_AUX_SIZE * RSA_AUX_COUNT * sizeof(_u32)); And printk. i made such a printk wrapper not to mess with

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Tasos Parisinos
Ok, from what i read, there are many-many similarities in objective but i think that i take a different aproach in the solution This is a mod for modular exponentiation only, and this is specific and simple, cut-down and (as much as possible) overhead free. I don't use gpg structs and /or other

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Paulo Marques
Matt Mackall wrote: [...] +/* Allocate space for the mpi and its data */ +s = (size / 4) + ((size % 4)? 1: 0); Uhhh.. (size + 1) / 4? You mean (size + 3) / 4, no? Overall, I agree with your comments: this file looks like it needs a lot more CodingStyle ;) Redefining standard

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Jan Engelhardt
On Mar 20 2007 10:15, Matt Mackall wrote: On Tue, Mar 20, 2007 at 04:44:01PM +0200, Tasos Parisinos wrote: +/* Pre-allocate some auxilliary mpis */ +rsa_echo(Preallocating %lu bytes for auxilliary operands\n, + RSA_AUX_SIZE * RSA_AUX_COUNT * sizeof(_u32)); And printk. i

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-20 Thread Indan Zupancic
On Tue, March 20, 2007 15:11, Tasos Parisinos wrote: Francois Romieu wrote: RSA is slow. syscalls are fast. Which part of the kernel is supposed to benefit from this code ? The main purpose behind the development of this module was to create an in-kernel system of signed modules. The

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Francois Romieu
Tasos Parisinos <[EMAIL PROTECTED]> : [...] RSA is slow. syscalls are fast. Which part of the kernel is supposed to benefit from this code ? -- Ueimor - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Matt Mackall
On Mon, Mar 19, 2007 at 06:22:15PM +0200, Tasos Parisinos wrote: > +static inline _i32 rsa_max(_i32 x, _i32 y) > +{ > +return (x > y)? x: y; > +} We've got a max() already. Use tabs. > + > +/* > + * Module loading callback function > + * > + * Returns 0 on success or a negative value

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1) (and i hope pine does not break it either)

2007-03-19 Thread Randy Dunlap
On Mon, 19 Mar 2007 19:22:00 +0200 (EET) Tasos Parisinos wrote: > As mentioned in the subject this patch applies in kernel version 2.6.20.1. It needs to apply to Linus's current tree (and it doesn't). > diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff > linux-2.6.20.1/crypto/Kconfig

[PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1) (and i hope pine does not break it either)

2007-03-19 Thread Tasos Parisinos
From: Tasos Parisinos <[EMAIL PROTECTED]> This patch changes the crypto/Kconfig and crypto/Makefile and adds crypto/rsa.c and crypto/rsa.h in the source tree. These files add module rsa.o (or rsa.ko) in the kernel (built-in or as a kernel module) and offer an API to do fast modular

[PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Tasos Parisinos
From: Tasos Parisinos <[EMAIL PROTECTED]> This patch changes the crypto/Kconfig and crypto/Makefile and adds crypto/rsa.c and crypto/rsa.h in the source tree. These files add module rsa.o (or rsa.ko) in the kernel (built-in or as a kernel module) and offer an API to do fast modular

[PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Tasos Parisinos
From: Tasos Parisinos [EMAIL PROTECTED] This patch changes the crypto/Kconfig and crypto/Makefile and adds crypto/rsa.c and crypto/rsa.h in the source tree. These files add module rsa.o (or rsa.ko) in the kernel (built-in or as a kernel module) and offer an API to do fast modular

[PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1) (and i hope pine does not break it either)

2007-03-19 Thread Tasos Parisinos
From: Tasos Parisinos [EMAIL PROTECTED] This patch changes the crypto/Kconfig and crypto/Makefile and adds crypto/rsa.c and crypto/rsa.h in the source tree. These files add module rsa.o (or rsa.ko) in the kernel (built-in or as a kernel module) and offer an API to do fast modular

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1) (and i hope pine does not break it either)

2007-03-19 Thread Randy Dunlap
On Mon, 19 Mar 2007 19:22:00 +0200 (EET) Tasos Parisinos wrote: As mentioned in the subject this patch applies in kernel version 2.6.20.1. It needs to apply to Linus's current tree (and it doesn't). diff -uprN -X linux-2.6.20.1-vanilla/Documentation/dontdiff linux-2.6.20.1/crypto/Kconfig

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Matt Mackall
On Mon, Mar 19, 2007 at 06:22:15PM +0200, Tasos Parisinos wrote: +static inline _i32 rsa_max(_i32 x, _i32 y) +{ +return (x y)? x: y; +} We've got a max() already. Use tabs. + +/* + * Module loading callback function + * + * Returns 0 on success or a negative value indicating error

Re: [PATCH RESEND 1/1] crypto API: RSA algorithm patch (kernel version 2.6.20.1)

2007-03-19 Thread Francois Romieu
Tasos Parisinos [EMAIL PROTECTED] : [...] RSA is slow. syscalls are fast. Which part of the kernel is supposed to benefit from this code ? -- Ueimor - To unsubscribe from this list: send the line unsubscribe linux-kernel in the body of a message to [EMAIL PROTECTED] More majordomo info at