LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Double XOR Cipher Will it increase safety?

I have just come into contact with the XOR Cipher encryption method, and I heard that as long as the frequency analysis is used, this simple mutual exclusion or cipher can be cracked.
So if I encrypt the text that was encrypted the first time with the second set of passwords, will this increase the difficulty of cracking?

 

I am not very proficient in mathematics. But thank you very much for your replies, this will let me learn~

koukileo_0-1634739743056.png

 

0 Kudos
Message 1 of 7
(3,229 Views)

Simple answer: no!

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(3,215 Views)

@koukileo wrote:

I have just come into contact with the XOR Cipher encryption method, and I heard that as long as the frequency analysis is used, this simple mutual exclusion or cipher can be cracked.
So if I encrypt the text that was encrypted the first time with the second set of passwords, will this increase the difficulty of cracking?

 

I am not very proficient in mathematics. But thank you very much for your replies, this will let me learn~

 

 


Yes, no, maybe...

 

There's really no mathematics going on besides Boolean Logic in a simple XOR encryption. 

 

The question is how secure do you really need to be?

 

Here's a page that links to a couple 3rd party encryption add-ons 

 

Here's an open source AES library for LabVIEW 

 

Consider taking a close look at the Open Source AES library source code to learn how they implemented AES.

 

 

 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 3 of 7
(3,212 Views)

@koukileo wrote:

So if I encrypt the text that was encrypted the first time with the second set of passwords, will this increase the difficulty of cracking?


Not enough to matter.  But this the basic idea behind Triple DES (encrypt with key A, decrypt with key B, encrypt with key C).  But DES already has a much higher security rating, so this actually does increase security significantly.

 

2 comments on your code:

1. NXG is now obsolete.  You should consider switching to LabVIEW 2020 or 2021.

2. The XOR node can accept integers, even arrays of integers.  So there is no need for the converting to/from boolean and even the FOR loops.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 7
(3,206 Views)

Since XOR is associative and commutative it doesn't help. 

Applying the XOR twice with different "passwords" is exactly the same as applying once, except the password used is (Password1 XOR Password2). 

 

It is this combined password that would be revealed just as easily as a single password using the same analysis technique.

 

0xDEAD

 

 

0 Kudos
Message 5 of 7
(3,201 Views)

Not saying anything new, but here's how I'd approach it:

 

1. Am I mostly concerned with how secure the end result is?   Then I'd use one of the many free encryption tools available that will give much better security.

 

2. Am I mostly just a little curious about what encryption means and how I could implement it in code?  Then some simple, reversible techniques like XOR or ROT13 are a fine place to get started.

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy coming to an end (finally!). Permanent license pricing remains WIP. Tread carefully.
0 Kudos
Message 6 of 7
(3,170 Views)

What does encryption have to do with "safety"?

0 Kudos
Message 7 of 7
(3,159 Views)