Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re^3: strings to number and XOR

by Anonymous Monk
on Oct 07, 2009 at 17:01 UTC ( #799761=note: print w/replies, xml ) Need Help??


in reply to Re^2: strings to number and XOR
in thread strings to number and XOR

I think I solved this. I just added 1 more, since an extra byte or two in the key doesn't hurt anything.
$key = "\x4f\xcb" x ((length($msg)/2)+1);
Aaron

Replies are listed 'Best First'.
Re^4: strings to number and XOR
by almut (Canon) on Oct 07, 2009 at 17:20 UTC
    an extra byte or two in the key doesn't hurt anything

    It's maybe worth trimming your XORed string to the original length, or else half of your key pattern might leak... (to anyone who makes an educated guess about the procedure)

    t h i s i s a t e s t m e s s a g e z 74 68 69 73 20 69 73 20 61 20 74 65 73 74 20 6d 65 73 73 61 67 65 7a 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f cb 4f c +b 3b a3 26 b8 6f a2 3c eb 2e eb 3b ae 3c bf 6f a6 2a b8 3c aa 28 ae 35 c +b ^ +^

    ... just in case you do want to keep it secret (I don't really know what you intent to use this for).

    (OTOH, if encryption was the idea, and security was of any relevance, I'd choose a different approach anyway :)

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://799761]
help
Chatterbox?
[hippo]: Loudest gig I can recall was Wolfsbane at the Astoria in the early 90s. Head rang for about 3 days afterwards. They were top, though.
[johngg]: My ears are still ringing!
Discipulus was outside The Clash concert in 1985..
[marto]: Wolfsbane , now I'm having flashbacks
[choroba]: Isn't Using PerlPod Creatively rather a meditation?
[choroba]: I don't see a question
[1nickt]: ugh, I stuck my head in the bass bin for 30 seconds on a dare at Ted Nugent at Hammersmith Odeon. Yes, I am 40% deaf now.
[johngg]: My daughter is incredibly jealous of my wife who got to see The Clash at Brixton many years ago. They went to see The Vaccines there recently.

How do I use this? | Other CB clients
Other Users?
Others examining the Monastery: (10)
As of 2017-03-24 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should Pluto Get Its Planethood Back?



    Results (301 votes). Check out past polls.