LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 04-27-2011, 03:55 AM   #1
dman777
Member
 
Registered: Dec 2010
Distribution: Gentoo
Posts: 232

Rep: Reputation: 8
Luks File Encryption Key- Use an Jpeg Image?


I read from https://wiki.archlinux.org/index.php...ith_a_Keyfile:
keyfile.binary:

where any binary file, images, text, video could be chosen as the keyfile


If I wanted to use a JPEG picture of my cat as a key, would this be possible? How does it actually read the image?
 
Old 04-27-2011, 04:00 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
it doesn't read the image, it reads a countably random stream of data.
 
Old 04-27-2011, 06:13 AM   #3
dman777
Member
 
Registered: Dec 2010
Distribution: Gentoo
Posts: 232

Original Poster
Rep: Reputation: 8
So to confirm, the the jpeg has it's own set stream of data that is read, correct?
 
Old 04-27-2011, 06:22 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
no you're not getting it. it's just data, nothing here cares in anyway whatsoever what the file is, it just reads it. It doesn't know it's an image, it doesn't have any interest in interpreting the file correctly at all. it's just gobbledygook to be used as an encryption hash, and lots of it...
 
1 members found this post helpful.
Old 04-27-2011, 09:26 AM   #5
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
Yea so what acid_kewpie is saying is that you point LUKS at a file, doesn't matter which and LUKS will read say the first 1MB of that file. Picture, music, movie, it doesn't matter. Either way the first 1MB is read and that is your key. I'm not saying it does read the first 1MB I'm just saying it reads a chunk of data from any file. That chunk of data is your key. If your file changes, and that chunk of data in the file changes, it will no longer work as a key.
 
1 members found this post helpful.
Old 04-27-2011, 09:37 AM   #6
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984Reputation: 1984
Quote:
Originally Posted by nomb View Post
Yea so what acid_kewpie is saying is that you point LUKS at a file, doesn't matter which and LUKS will read say the first 1MB of that file. Picture, music, movie, it doesn't matter. Either way the first 1MB is read and that is your key. I'm not saying it does read the first 1MB I'm just saying it reads a chunk of data from any file. That chunk of data is your key. If your file changes, and that chunk of data in the file changes, it will no longer work as a key.
What if I have two pictures of my cat? Will they both work? What if he gets bigger in one of them or has a different colour collar on?
 
Old 04-27-2011, 10:02 AM   #7
nomb
Member
 
Registered: Jan 2006
Distribution: Debian Testing
Posts: 675

Rep: Reputation: 58
If the data read from both files are the same, then they both should work.
If the data read from both files is different, then only one will work.
If they are different you could add the other to another key slot and then they both would work.
 
Old 04-27-2011, 01:55 PM   #8
Ansikt
LQ Newbie
 
Registered: Apr 2011
Posts: 2

Rep: Reputation: 0
Please, acid_kewpie, explain how "the jpeg has its own set stream of data that is read" is "not getting it at all," because as far as I can tell, that's a perfectly apt description. But thanks for the condescension!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
luks crupted Partition, accessible olny with a key-file paliga Linux - Security 1 01-05-2011 07:30 PM
[SOLVED] retrieving jpeg files from BkUp copy yields:ERR INTERPRETING JPEG; file not jpeg, drmjh Linux - General 7 10-03-2010 08:13 AM
LUKS encryption, sets xyzone Linux - Security 1 06-21-2010 12:43 AM
How to use key file instead of password for LUKS encrypted file systems? lucmove Linux - Security 2 06-30-2009 09:17 AM
Reading .jpeg / .gif / or any image file in C in Linux amroz Linux - Newbie 1 06-03-2008 10:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 07:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration