# LabVIEW

cancel
Showing results 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~

Message 1 of 7
(3,166 Views)

## Re: Double XOR Cipher Will it increase safety?

Best regards,
GerdW

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

## Re: Double XOR Cipher Will it increase safety?

@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?

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

========================
=== Engineer Ambiguously ===
========================
Message 3 of 7
(3,149 Views)

## Re: Double XOR Cipher Will it increase safety?

@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.

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.

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
Message 4 of 7
(3,143 Views)

## Re: Double XOR Cipher Will it increase safety?

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

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

Message 5 of 7
(3,138 Views)

## Re: Double XOR Cipher Will it increase safety?

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