ecryptfs-setup-private gets signature size from the wrong place

Bug #919049 reported by Eric O'Connor
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
eCryptfs
Triaged
Low
Dustin Kirkland 

Bug Description

The constant ECRYPTFS_SIG_SIZE_HEX is defined as 16 in include/ecryptfs.h

ecryptfs-setup-private (on line 396) expects a signature length == $KEYBYTES, which by default is set to aes-128.

It should really be compared to the constant ECRYPTFS_SIG_SIZE_HEX as originally defined.

Also, the ecryption algorithm and the key size should be configurable from the command line.

Revision history for this message
Tyler Hicks (tyhicks) wrote :

Thanks, Eric. The issue you brought up with $KEYBYTES seems to be valid. We're wanting to grab the key signature, not the key contents, so it would be a good idea to use another variable. It just so happens that $KEYBYTES and ECRYPTFS_SIG_SIZE_HEX work out to be the same value right now...

Dustin will have to address the second request of making the encryption alg and key size configurable.

Assigning this one to Dustin, since this is typically his area.

Changed in ecryptfs:
assignee: nobody → Dustin Kirkland (kirkland)
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Dustin Kirkland  (kirkland) wrote :

Thanks for the bug report. I think you're correct on the ECRYPTFS_SIG_SIZE_HEX / KEYBYTES inconsistency. I'll get that fixed.

As for making the cipher and key size configurable, I won't be doing this for mount.ecryptfs_private. If you have a strong opinion and a need to modify these, then you should use mount -t ecryptfs -o options, and not the ecryptfs-setup-private helpers. The goal of the private helpers is to assist less technical Ubuntu users setup encryption in a way that they don't need to care about the defaults and in a manner that we can support them consistently. Sorry.

Thanks!
Dustin

Changed in ecryptfs:
status: Confirmed → Triaged
Jason Xing (wlxing)
Changed in ecryptfs:
status: Triaged → Fix Released
Revision history for this message
Tyler Hicks (tyhicks) wrote :

This bug is not fixed. Please don't close bugs without a stating the reason you're closing the bug, such as a reference to a released fix.

Changed in ecryptfs:
status: Fix Released → Triaged
Revision history for this message
Jason Xing (wlxing) wrote :

Yesterday, I checked these two files as follows:
1) Macro "ECRYPTFS_SIG_SIZE_HEX" in ecryptfs.h (see http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/include/ecryptfs.h#L81)
2) Definition "KEYBYTES" in src/utils/ecryptfs-setup-private (see http://bazaar.launchpad.net/~ecryptfs/ecryptfs/trunk/view/head:/src/utils/ecryptfs-setup-private#L16)

They are the same value 16. So I thought it has been fixed...

Revision history for this message
Jason Xing (wlxing) wrote :

What do you say? I'm not sure if I get the right point.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.