Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2006

Tip: Looking for answers? Try searching our database.

how can use xor logic

Thread view: 
suma - 10 May 2006 20:26 GMT
hi
i want encryption & decryption when enter password
iwant use xor to make this
how that???

please tell me
Oliver Wong - 10 May 2006 21:39 GMT
> hi
> i want encryption & decryption when enter password
> iwant use xor to make this
> how that???

Use the ^ operator. See
http://java.sun.com/docs/books/jls/third_edition/html/expressions.html#15.22.1

   - Oliver
Luc The Perverse - 10 May 2006 21:56 GMT
> hi
> i want encryption & decryption when enter password
> iwant use xor to make this
> how that???
>
> please tell me

If all you want to do is obscure something, then XOR will work just fine.

If true security is an issue then you will want to use something else,
perhaps a product you didn't write yourself.

--
LTP

:)
jmcgill - 10 May 2006 22:03 GMT
> If true security is an issue then you will want to use something else,
> perhaps a product you didn't write yourself.

What have you got that's cryptographically stronger than xor against a
OTP of good noise?
Oliver Wong - 10 May 2006 22:05 GMT
>> If true security is an issue then you will want to use something else,
>> perhaps a product you didn't write yourself.
>
> What have you got that's cryptographically stronger than xor against a OTP
> of good noise?

   It's not the technique (i.e. OTP) which leads to weakness, it's
implementing it yourself (and potentially introducing bugs) which does. A
common story is trace of the cleartext being present in a temporary file or
in the system swap file.

   - Oliver
Luc The Perverse - 11 May 2006 01:55 GMT
>> If true security is an issue then you will want to use something else,
>> perhaps a product you didn't write yourself.
>
> What have you got that's cryptographically stronger than xor against a OTP
> of good noise?

Ok - where do you get your noise?  How do you share it?

A person that does not know how to XOR two numbers together needs more
experience before writing cryptographic software.

--
LTP

:)
jmcgill - 11 May 2006 02:09 GMT
> Ok - where do you get your noise?  How do you share it?

I never said it would be easy.

> A person that does not know how to XOR two numbers together needs more
> experience before writing cryptographic software.

Based on the original post, I just figured it was some educational
exercise where the poster had little risk.  If it's something more
significant than that, I'd point out that there are people with Ph.D.'s
in CS and Math working in bakeries and bookshops.
Luc The Perverse - 11 May 2006 05:57 GMT
>> A person that does not know how to XOR two numbers together needs more
>> experience before writing cryptographic software.
>
> Based on the original post, I just figured it was some educational
> exercise where the poster had little risk.

A naive assumption.   He could be a conspiracy theorist who believes that
all software programs have backdoors in them to allow hacking, so he will
protect himself by XORing against a passphrase represented in ASCII,
repeated.

Perhaps the appropriate question would have been what it would be used for.
But as the OP has not again posted, I am not so sure he/she is following the
thread at all.

Encoding and stenographics can be fun, but true security comes from the
Ph.D.'s as you mentioned.  (Although I didn't follow your part about
bakeries.)

--
LTP

:)
jmcgill - 11 May 2006 06:39 GMT
> Encoding and stenographics can be fun, but true security comes from the
> Ph.D.'s as you mentioned.  (Although I didn't follow your part about
> bakeries.)

Oh, it's just a reference to the irony of someone like the original
poster working as a software engineer, drawing a salary, while people
who would be far more qualified are lucky to be baking dinner rolls in a
cafeteria, or working as cashier in a book store.  That sort of thing.
The janitor at Lincoln Center is a tenor with a high C...
jmcgill - 10 May 2006 21:57 GMT
> hi
> i want encryption & decryption when enter password
> iwant use xor to make this
> how that???
>
> please tell me

Take your clear text and some randomly generated text.  xor each bit of
the clear text with each bit of the random text.  Never reuse that block
of randomly generated text.  This simple cipher turns out to be among
the strongest forms of encryption.

The hard part is if you have to transmit that secret text to some
recipient, of course...


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.