Call for testing: libfcat

Get it from the Snap Store
amd64 arm64 armhf ppc64el s390x

testing

  1. install libfcat

  2. run the below commands (and others if you’re inclined)

  3. sharing the snap version would be helpful

      $ snap --version
    
  4. please share if you have any errors, suggestions, or questions

note

  • there are other commands as well, each command has a --help flag to expand its options.
  • commands libfcat k and libfcat sid are unstable.
  • libfcat reads from the entropy pools on /dev/urandom -
    be careful passing in large values when generating primes (ie; libfcat rp -s 5096 is going to consume 5096 bits of entropy, which, may take some time)

thank you


install

sudo snap install --channel=stable libfcat

cmds to test

prime generation

(32 bits, base 2 (default))

$ libfcat rp -s 32
> 11101101011111000100101111001001

(128 bits, base 10)

$ libfcat rp -s 128 -b 10
> 288341291201192079262991806868395503731

(128 bits, base 62)

$ libfcat rp -s 128 -b 62
> 6KXKOM4cPg79aYBSBFJZft

iteratively generate primes (2-16 bits, base 2)

$ bash <(echo -e "libfcat rp -b 2 -s "{2..16}"\n")
11
111
1101
11101
111011
1100101
11011111
111001001
1100010011
11011010011
110010110011
1111000000111
11001010011001
110000100101101
1110100111100111

encoding/decoding files/arguments

for the next tests…

write a random prime to a local file for testing the next commands or have a text file to test

this can be any file

$ bash <(echo -e "\nlibfcat rp -s "{126..128}" -b "{48..50}) > _test_primes

here I generate the Cartesian product of single, random primes between 126-127 bit size with a base of 48-49.

$ cat _test_primes
6yhvFHw7F0Db5mfsxy0Ldq5
4MLm4r7C5sHCcgkJCFgttea
2Ca1gna0ptihE7NjMaCNnaN
eip82EKfsgBLLbxsEeb2D71
aIfgdfAcvn448MzKwupDi0h
6jqEnH8gb37n0t7qja1D9Kb
w5kpw6IzilFGm40CGwibvkL
hc48iBf3zl0KL3i13lJAM1a
cM4FiqLs0MnLEIApirDnjN1

test encoding from stdin

$ cat _test_primes | libfcat e
NnlodkZIdzdGMERiNW1mc3h5MExkcTUKNE1MbTRyN0M1c0hDY2drSkNGZ3R0ZWEKMkNhMWduYTBwdGloRTdOak1hQ05uYU4KZWlwODJFS2ZzZ0JMTGJ4c0VlYjJENzEKYUlmZ2RmQWN2bjQ0OE16S3d1cERpMGgKNmpxRW5IOGdiMzduMHQ3cWphMUQ5S2IKdzVrcHc2SXppbEZHbTQwQ0d3aWJ2a0wKaGM0OGlCZjN6bDBLTDNpMTNsSkFNMWEKY000RmlxTHMwTW5MRUlBcGlyRG5qTjE=

test encoding direct args

$ libfcat e "$(cat _test_primes)"
NnlodkZIdzdGMERiNW1mc3h5MExkcTUKNE1MbTRyN0M1c0hDY2drSkNGZ3R0ZWEKMkNhMWduYTBwdGloRTdOak1hQ05uYU4KZWlwODJFS2ZzZ0JMTGJ4c0VlYjJENzEKYUlmZ2RmQWN2bjQ0OE16S3d1cERpMGgKNmpxRW5IOGdiMzduMHQ3cWphMUQ5S2IKdzVrcHc2SXppbEZHbTQwQ0d3aWJ2a0wKaGM0OGlCZjN6bDBLTDNpMTNsSkFNMWEKY000RmlxTHMwTW5MRUlBcGlyRG5qTjE

test decoding base64

$ cat _test_primes | libfcat e | libfcat d
6yhvFHw7F0Db5mfsxy0Ldq5
4MLm4r7C5sHCcgkJCFgttea
2Ca1gna0ptihE7NjMaCNnaN
eip82EKfsgBLLbxsEeb2D71
aIfgdfAcvn448MzKwupDi0h
6jqEnH8gb37n0t7qja1D9Kb
w5kpw6IzilFGm40CGwibvkL
hc48iBf3zl0KL3i13lJAM1a
cM4FiqLs0MnLEIApirDnjN1

test the above with hexadecimal

$ cat _test_primes | libfcat e -t=hex 
367968764648773746304462356d66737879304c6471350a344d4c6d347237433573484363676b4a434667747465610a32436131676e61307074696845374e6a4d61434e6e614e0a6569703832454b667367424c4c627873456562324437310a6149666764664163766e3434384d7a4b777570446930680a366a71456e4838676233376e307437716a613144394b620a77356b707736497a696c46476d34304347776962766b4c0a68633438694266337a6c304b4c336931336c4a414d31610a634d344669714c73304d6e4c454941706972446e6a4e31

generate sawtooth waves of prime numbers taken from entropy & use them to seed the generation of elliptic curve params


Removing libfcat

sudo snap remove --purge libfcat

thanks for testing