Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
XOR encryption/decryption.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
alechiko
Guru
Guru


Joined: 01 Feb 2004
Posts: 465
Location: Inside piano, do not disturb.

PostPosted: Sun Nov 27, 2005 2:59 am    Post subject: XOR encryption/decryption. Reply with quote

Does anyone know of any packages available that can carry out XOR encryption and decryption?
_________________
None
Back to top
View user's profile Send private message
tgh
Apprentice
Apprentice


Joined: 05 Oct 2005
Posts: 222

PostPosted: Sun Nov 27, 2005 3:12 am    Post subject: Reply with quote

For what purpose?

Protecting contents of files? Protecting entire filesystems (loopback encryption I think)?

gawk includes an xor() function, but I don't know if it would do what you need. (And xor encryption is very weak.)
Back to top
View user's profile Send private message
sundialsvc4
Guru
Guru


Joined: 10 Nov 2005
Posts: 436

PostPosted: Sun Nov 27, 2005 9:49 pm    Post subject: Reply with quote

If you really want to protect files, then use real encryption, such as what's provided by gpg.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Tue Jun 06, 2006 1:17 pm    Post subject: Reply with quote

sundialsvc4 wrote:
If you really want to protect files, then use real encryption, such as what's provided by gpg.

Sorry, but I NEED to add this:
XOR is the only unbreakable encryption, IF IT IS DONE CORRECTLY.
if you XOR your data with a one-time-pad, it's unbreakable
Back to top
View user's profile Send private message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Tue Jun 06, 2006 1:45 pm    Post subject: Reply with quote

nielchiano wrote:
if you XOR your data with a one-time-pad, it's unbreakable


If your OTP is of equal size or larger than your data, that is, and if you have a truly (not "sufficiently") random OTP.

GPG, AES-CRYPT, et. al. all perform XOR transforms on your data, they've just worked out sufficiently strong algorithms that overcome the need to have a massive keyspace. As long as your key is secure, I can't see any reason you'd need more than AES-256; yes, someone can "still" crack it, but they would have to be extraordinarily well-funded. If a US-Govt. approved cipher makes you feel uncomfortable (even though Schneier espouses it), maybe look at some of the other international AES candidates.
Back to top
View user's profile Send private message
nielchiano
Veteran
Veteran


Joined: 11 Nov 2003
Posts: 1287
Location: 50N 3E

PostPosted: Tue Jun 06, 2006 1:54 pm    Post subject: Reply with quote

guero61 wrote:
nielchiano wrote:
if you XOR your data with a one-time-pad, it's unbreakable

If your OTP is of equal size or larger than your data, that is, and if you have a truly (not "sufficiently") random OTP.

GPG, AES-CRYPT, et. al. all perform XOR transforms on your data, they've just worked out sufficiently strong algorithms that overcome the need to have a massive keyspace. As long as your key is secure, I can't see any reason you'd need more than AES-256; yes, someone can "still" crack it, but they would have to be extraordinarily well-funded. If a US-Govt. approved cipher makes you feel uncomfortable (even though Schneier espouses it), maybe look at some of the other international AES candidates.

I completely agree with you... but I just wanted to note that XOR is not ALWAYS bad.
Back to top
View user's profile Send private message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Tue Jun 06, 2006 2:25 pm    Post subject: Reply with quote

Understood. I am unaware of a program that does this in a responsible manner (doesn't try to perform the entire transform in memory), but one should be rather trivial to write, even in a scripting language like perl. I'll see if I can throw down a decent POC.
Back to top
View user's profile Send private message
guero61
l33t
l33t


Joined: 14 Oct 2002
Posts: 811
Location: Behind you

PostPosted: Tue Jun 06, 2006 4:40 pm    Post subject: Reply with quote

POC not coming - not enough time to write a *good* one or support it. Started a quick Perl one, but ran into the issue that the '^' operator wants to concatenate strings, not XOR them. Ended up packing them into bit strings, but it's ugly and nothing I want to publish.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum