aboutsummaryrefslogtreecommitdiff
path: root/sts/keygen.sts
diff options
context:
space:
mode:
authorAleksey Veresov <aleksey@veresov.pro>2020-10-18 18:22:31 +0300
committerAleksey Veresov <aleksey@veresov.pro>2020-10-18 18:22:31 +0300
commitdf0d6a4503a26508553510b4050eaa79f52e4e4e (patch)
tree2517b6070319270a4cb0df9dcf3814b16ecaece9 /sts/keygen.sts
parent9eadc7bac8863b7fd3a39edc9ba31cf4d3b5ab95 (diff)
downloadcryptrobber-df0d6a4503a26508553510b4050eaa79f52e4e4e.tar
cryptrobber-df0d6a4503a26508553510b4050eaa79f52e4e4e.tar.xz
cryptrobber-df0d6a4503a26508553510b4050eaa79f52e4e4e.zip
Another step to release.
Diffstat (limited to 'sts/keygen.sts')
-rw-r--r--sts/keygen.sts34
1 files changed, 34 insertions, 0 deletions
diff --git a/sts/keygen.sts b/sts/keygen.sts
new file mode 100644
index 0000000..6067c0d
--- /dev/null
+++ b/sts/keygen.sts
@@ -0,0 +1,34 @@
+defword keygen
+ ; Increment
+ 0
+ do
+ over over = until
+ dup 2 + get
+ dup ff < if
+ 1 + over 2 + set
+ drop
+ exit
+ fi
+ drop 0 over 2 + set
+ 1 +
+ od
+ drop
+
+ ; Clean old stack data
+ dup
+ do
+ dup 0 = until
+ 1 get 2 set swap drop
+ 1 -
+ od
+ drop
+
+ 1 +
+ 0
+ do
+ over over = until
+ dup 2 get 1 set 0 2 set
+ 1 +
+ od
+ drop
+exit