Einzelnen Beitrag anzeigen

Kas Ob.

Registriert seit: 3. Sep 2023
475 Beiträge
 
#4

AW: One Time Pad Geschwindigkeit

  Alt Heute, 07:55
Zitat:
I would suggest to fine benchmark it for small sizes because it make little sense to use it on huge data,
Do you refer to the slow 1.4 Mb/s or in general?
Zitat:
then compare with that paper, if you can get half the speed then with Delphi compiler then it is great.
8192 bits in 0.643735 ms is about 12,74 Gbit/s, so do you mean I can be happy with about 6 Gbit/s?
Ok, I think we are losing each other while translation and language barrier could play a role here.

First you didn't confirm my first question if the topic is about One-Time pad encryption/ciphering algorithm ?!
So i will assume it is, and continue based on that.

Second: One-Time pad is merely XORing the plaintext (data/message..) with key, key length must be at least equal to the length plaintext, so performing encryption and decryption should have the same speed and it is very close to the speed of memory copying, worst case scenario it would be at half of that speed.

Now to the numbers, Memory Coppy speed for modern CPUs ( last 20 years ) in giga bytes, the copy speed on my CPU (i5-2500k) is over 22 Giga bytes per second, so yes even with Delphi generated code, you should hit way higher numbers and speed against that (10,5 MB/ min) you mentioned, see, my Snappy compression implementation in Delphi can hit between 300-700 mega bytes per second (compressing/decompressing) and that without SIMD, in SIMD it can hit over 1.5 GB per second, AES in Delphi (without Assembly or AES) is between 70-300 mega bytes per second, and this AES has hundreds of XOR operation per 10-14 rounds and that only for one 16 bytes block, can you see or predict the numbers now ...?!

That being said, the One-Time pad is called unbreakable, because there is no cryptanalysis can be performed on it, but under one condition fulfilling its main and crucial condition to be called One-Time Pad, which is using True Random, and you can't use pseudorandom, and that brings us back to the speed:

Did you benchmarked the Key generation with encryption ?
Are your numbers only on Encryption and Decryption ? because it is scimple XOR over two blocks of memory

So, please read what i wrote here, and correct me if we are talking about different algorithm, in all cases think about the numbers i gave you in this very post, and forget about that paper as it might be very irrelevant to your implmentaiton, but it is th eonly one i found on the internet while searching for numbers.

PS: read the Wikipedia article and its sources, as it is crucial to be using True Random, and it is pain in the back to get it right.
Kas
  Mit Zitat antworten Zitat