All of lore.kernel.org
 help / color / mirror / Atom feed
* [dm-crypt] RHEL6 crypto support
@ 2013-01-18 19:16 David Li
  2013-01-18 19:33 ` Arno Wagner
  0 siblings, 1 reply; 6+ messages in thread
From: David Li @ 2013-01-18 19:16 UTC (permalink / raw)
  To: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1354 bytes --]

Here is a newbie question.

I encountered an error at luksFormat on a loop device:

device-mapper: reload ioctl failed: Invalid argument
Failed to setup dm-crypt key mapping for device /dev/loop0.
Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
more info).

So I guesss my RHEL6 doesn't have the proper crypto module installed. This
is a dump of /proc/crypto:


bash-4.1# cat /proc/crypto
name         : stdrng
driver       : krng
module       : kernel
priority     : 200
refcnt       : 1
selftest     : passed
type         : rng
seedsize     : 0

name         : crc32c
driver       : crc32c-generic
module       : kernel
priority     : 100
refcnt       : 2
selftest     : passed
type         : shash
blocksize    : 1
digestsize   : 4

name         : sha1
driver       : sha1-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : shash
blocksize    : 64
digestsize   : 20

name         : md5
driver       : md5-generic
module       : kernel
priority     : 0
refcnt       : 1
selftest     : passed
type         : shash
blocksize    : 64
digestsize   : 1



But I am not quite sure which package is missing here.  Is it something
more general like "yum install aes"?

In general, how do I check if all the required crypto modules are supported
before running any cryptsetup commands?

[-- Attachment #2: Type: text/html, Size: 2178 bytes --]

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

* Re: [dm-crypt] RHEL6 crypto support
  2013-01-18 19:16 [dm-crypt] RHEL6 crypto support David Li
@ 2013-01-18 19:33 ` Arno Wagner
  2013-01-18 19:37   ` Milan Broz
  0 siblings, 1 reply; 6+ messages in thread
From: Arno Wagner @ 2013-01-18 19:33 UTC (permalink / raw)
  To: dm-crypt

On Fri, Jan 18, 2013 at 11:16:42AM -0800, David Li wrote:
> Here is a newbie question.
> 
> I encountered an error at luksFormat on a loop device:
> 
> device-mapper: reload ioctl failed: Invalid argument
> Failed to setup dm-crypt key mapping for device /dev/loop0.
> Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
> more info).
> 
> So I guesss my RHEL6 doesn't have the proper crypto module installed. This
> is a dump of /proc/crypto:
[....]
> But I am not quite sure which package is missing here.  Is it something
> more general like "yum install aes"?

Is this a self-compiled cryptsetup? If not, the installer 
should install all the modules at least for the defaults
when you install "cryptsetup". They should then be loaded 
on-demand I think, but I have not used a module-kernel in 
a long, long time.

> In general, how do I check if all the required crypto modules are supported
> before running any cryptsetup commands?

Just run it and see whether it complains. 

Arno
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell

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

* Re: [dm-crypt] RHEL6 crypto support
  2013-01-18 19:33 ` Arno Wagner
@ 2013-01-18 19:37   ` Milan Broz
  2013-01-18 19:44     ` Arno Wagner
  2013-01-18 19:45     ` David Li
  0 siblings, 2 replies; 6+ messages in thread
From: Milan Broz @ 2013-01-18 19:37 UTC (permalink / raw)
  To: dm-crypt; +Cc: w.david.li

On 01/18/2013 08:33 PM, Arno Wagner wrote:
> On Fri, Jan 18, 2013 at 11:16:42AM -0800, David Li wrote:
>> Here is a newbie question.
>>
>> I encountered an error at luksFormat on a loop device:
>>
>> device-mapper: reload ioctl failed: Invalid argument
>> Failed to setup dm-crypt key mapping for device /dev/loop0.
>> Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
>> more info).
>>
>> So I guesss my RHEL6 doesn't have the proper crypto module installed. This
>> is a dump of /proc/crypto:
> [....]
>> But I am not quite sure which package is missing here.  Is it something
>> more general like "yum install aes"?
> 
> Is this a self-compiled cryptsetup?

I would say it is self-compiled kernel :)

RHEL6 default kernel will autoload crypto modules as requested.
(And upstream cryptsetup works there too, it is one of the testing platform)

What's the kernel and cryptsetup version?

Milan

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

* Re: [dm-crypt] RHEL6 crypto support
  2013-01-18 19:37   ` Milan Broz
@ 2013-01-18 19:44     ` Arno Wagner
  2013-01-18 19:45     ` David Li
  1 sibling, 0 replies; 6+ messages in thread
From: Arno Wagner @ 2013-01-18 19:44 UTC (permalink / raw)
  To: dm-crypt

On Fri, Jan 18, 2013 at 08:37:59PM +0100, Milan Broz wrote:
> On 01/18/2013 08:33 PM, Arno Wagner wrote:
> > On Fri, Jan 18, 2013 at 11:16:42AM -0800, David Li wrote:
> >> Here is a newbie question.
> >>
> >> I encountered an error at luksFormat on a loop device:
> >>
> >> device-mapper: reload ioctl failed: Invalid argument
> >> Failed to setup dm-crypt key mapping for device /dev/loop0.
> >> Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
> >> more info).
> >>
> >> So I guesss my RHEL6 doesn't have the proper crypto module installed. This
> >> is a dump of /proc/crypto:
> > [....]
> >> But I am not quite sure which package is missing here.  Is it something
> >> more general like "yum install aes"?
> > 
> > Is this a self-compiled cryptsetup?
> 
> I would say it is self-compiled kernel :)

;-)

In that case my advice is to just compile everything crypto 
statically in. I have done that for quite some time now,
never any problems.

Arno
 
> RHEL6 default kernel will autoload crypto modules as requested.
> (And upstream cryptsetup works there too, it is one of the testing platform)
 
> What's the kernel and cryptsetup version?
> 
> Milan
> _______________________________________________
> dm-crypt mailing list
> dm-crypt@saout.de
> http://www.saout.de/mailman/listinfo/dm-crypt

-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
One of the painful things about our time is that those who feel certainty
are stupid, and those with any imagination and understanding are filled
with doubt and indecision. -- Bertrand Russell

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

* Re: [dm-crypt] RHEL6 crypto support
  2013-01-18 19:37   ` Milan Broz
  2013-01-18 19:44     ` Arno Wagner
@ 2013-01-18 19:45     ` David Li
  2013-01-18 19:56       ` Milan Broz
  1 sibling, 1 reply; 6+ messages in thread
From: David Li @ 2013-01-18 19:45 UTC (permalink / raw)
  To: Milan Broz; +Cc: dm-crypt

[-- Attachment #1: Type: text/plain, Size: 1339 bytes --]

I don't have this issue on a standard RHEL6. But this is when I tested my
code on a slightly "customized" RHEL6. I guess something has been removed
but not totally sure.

-bash-4.1# cryptsetup --version
cryptsetup 1.2.0
-bash-4.1#
-bash-4.1#
-bash-4.1# uname -r
2.6.32-131.6.1.el6.x86_64



On Fri, Jan 18, 2013 at 11:37 AM, Milan Broz <gmazyland@gmail.com> wrote:

> On 01/18/2013 08:33 PM, Arno Wagner wrote:
> > On Fri, Jan 18, 2013 at 11:16:42AM -0800, David Li wrote:
> >> Here is a newbie question.
> >>
> >> I encountered an error at luksFormat on a loop device:
> >>
> >> device-mapper: reload ioctl failed: Invalid argument
> >> Failed to setup dm-crypt key mapping for device /dev/loop0.
> >> Check that kernel supports aes-cbc-essiv:sha256 cipher (check syslog for
> >> more info).
> >>
> >> So I guesss my RHEL6 doesn't have the proper crypto module installed.
> This
> >> is a dump of /proc/crypto:
> > [....]
> >> But I am not quite sure which package is missing here.  Is it something
> >> more general like "yum install aes"?
> >
> > Is this a self-compiled cryptsetup?
>
> I would say it is self-compiled kernel :)
>
> RHEL6 default kernel will autoload crypto modules as requested.
> (And upstream cryptsetup works there too, it is one of the testing
> platform)
>
> What's the kernel and cryptsetup version?
>
> Milan
>

[-- Attachment #2: Type: text/html, Size: 2029 bytes --]

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

* Re: [dm-crypt] RHEL6 crypto support
  2013-01-18 19:45     ` David Li
@ 2013-01-18 19:56       ` Milan Broz
  0 siblings, 0 replies; 6+ messages in thread
From: Milan Broz @ 2013-01-18 19:56 UTC (permalink / raw)
  To: David Li; +Cc: dm-crypt

On 01/18/2013 08:45 PM, David Li wrote:
> I don't have this issue on a standard RHEL6. But this is when I
> tested my code on a slightly "customized" RHEL6. I guess something
> has been removed but not totally sure.

You are missing kernel crypto modules loaded. But because you did
not specify what "customized" means, I cannot help, sorry.

Just compare what modules are loaded on default install
and in your customized version and you will see what is missing.

Milan

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

end of thread, other threads:[~2013-01-18 19:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-18 19:16 [dm-crypt] RHEL6 crypto support David Li
2013-01-18 19:33 ` Arno Wagner
2013-01-18 19:37   ` Milan Broz
2013-01-18 19:44     ` Arno Wagner
2013-01-18 19:45     ` David Li
2013-01-18 19:56       ` Milan Broz

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.