AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Thema durchsuchen
Ansicht
Themen-Optionen

One Time Pad Geschwindigkeit

Ein Thema von DelphiUser123 · begonnen am 10. Sep 2025 · letzter Beitrag vom 11. Sep 2025
Antwort Antwort
DelphiUser123

Registriert seit: 23. Feb 2013
49 Beiträge
 
#1

One Time Pad Geschwindigkeit

  Alt 10. Sep 2025, 22:59
Hallo liebes Forum.
Ich habe ein kleines One Time Pad Programm programmiert, zusätzlich zum Encodieren mit einer Schlüsseldatei wird die Ausgabe bitinvertiert. Nun stellt sich mir die Frage ob die Geschwindigkeit des Programms so okay ist.
Es dauert 1,4 Mbit/s (10,5 MB/ min) auf meinem Computer.
Vielen Dank für Hinweise.
  Mit Zitat antworten Zitat
Kas Ob.
Online

Registriert seit: 3. Sep 2023
474 Beiträge
 
#2

AW: One Time Pad Geschwindigkeit

  Alt Gestern, 08:33
Hi,
Hallo liebes Forum.
Ich habe ein kleines One Time Pad Programm programmiert, zusätzlich zum Encodieren mit einer Schlüsseldatei wird die Ausgabe bitinvertiert. Nun stellt sich mir die Frage ob die Geschwindigkeit des Programms so okay ist.
Es dauert 1,4 Mbit/s (10,5 MB/ min) auf meinem Computer.
Vielen Dank für Hinweise.
Are we talking about this one-time pad encryption https://en.wikipedia.org/wiki/One-time_pad

1.4Mbit/s is so slow that makes encrypting with AES then compressing with ZLib then convert it using Base64 faster at least 10 times.

Again, if we are talking about one-time pad encryption/cipher which is merely an XOR operation limited by IO, in this case it is memory access.

Here a nice paper on ResearchGate https://www.researchgate.net/publica..._Pad_Algorithm
and here some result of little optimized approach , on Page 19
Zitat:
Table 8. Speed test results with different plaintext lengths.
Length of Plaintext Verification Time
128 bits 0.203495 ms
256 bits 0.241399 ms
512 bits 0.258441 ms
1024 bits 0.287604 ms
2048 bits 0.345361 ms
4096 bits 0.421147 ms
8192 bits 0.643735 ms
So 1KB is less than 1ms making 1MB less than 1second, but judging by that table it is non-linear thus we can safely assume it will be slower than 2ms for triple/quadruple of the biggest which means 4kb it will be slower than 1ms, yet here we should not forget the L1 cache and when you hit it the performance might sliced by half at least.

I would suggest to fine benchmark it for small sizes because it make little sense to use it on huge data, then compare with that paper, if you can get half the speed then with Delphi compiler then it is great.

PS: the paper about utilizing sign-on using OTP so there is more extra work that doesn't concern your implementation, yet OTP is simple XOR based, so i think (and hope i am not wrong) you can hit tens if not hundreds of megabytes per second.
Kas
  Mit Zitat antworten Zitat
Antwort Antwort


Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 11:39 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz