-128 Block size: 64 or 128. (for symmetric encryption only) (default 64) -512 Bit length: 256 or 512. (default 256) -check string Check hashsum file. ('-' for STDIN) -crypt string Encrypt/Decrypt with symmetric ciphers. -digest string File/Wildcard to generate hashsum list. ('-' for STDIN) -hex string Encode binary string to hex format and vice-versa. -hkdf int Hash-based key derivation function with a given output bit length. -info string Associated data, additional info. (for HKDF and AEAD encryption) -iter int Iterations. (for SHRED and PBKDF2 only) (default 1) -iv string Initialization vector. (for non-AEAD symmetric encryption) -key string Private/Public key, password or HMAC key, depending on operation. -mac string Compute hash-based/cipher-based message authentication code. -mode string Mode of operation: MGM, CTR or OFB. (default "MGM") -old Use old roll of algorithms. -paramset string Elliptic curve ParamSet: A, B, C, D, XA, XB. (default "A") -pbkdf2 Password-based key derivation function 2. -pkey string Generate keypair, Derive shared secret, Sign and Verify. -pub string Remote's side public key. -rand int Generate random cryptographic key with a given output bit length. -recursive Process directories recursively. (for DIGEST command only) -salt string Salt. (for PBKDF2 and HKDF commands) -shred string Files/Path/Wildcard to apply data sanitization method. -signature string Input signature. (verification only) -version Print version information.
./gosttk -pkey gen -512
./gosttk -pkey sign -512 -key $prvkey < file.ext > sign.txt
sign=$(cat sign.txt)
./gosttk -pkey verify -512 -key $pubkey -signature $sign < file.ext
./gosttk -pkey derive -512 -key $prvkey -pub $pubkey
./gosttk -crypt enc -128 -key $shared < plaintext.ext > ciphertext.ext
./gosttk -crypt dec -128 -key $shared < ciphertext.ext > plaintext.ext
./gosttk -crypt enc -key $shared < plaintext.ext > ciphertext.ext
./gosttk -crypt dec -key $shared < ciphertext.ext > plaintext.ext
./gosttk -crypt enc -old -key $shared < plaintext.ext > ciphertext.ext
./gosttk -crypt dec -old -key $shared < ciphertext.ext > plaintext.ext
./gosttk -digest "*.*" -old
./gosttk -digest - -old < file.ext
./gosttk -mac hmac -old -key $256bitkey < file.ext
./gosttk -digest - -512 < file.ext
./gosttk -mac hmac -512 -key $256bitkey < file.ext
./gosttk -pbkdf2 [-512|-old] -key "pass" -iter 10000 -salt "salt"
key=$(./gosttk -pbkdf2 -key "password") ; history -d $(history 1)
./gosttk -shred keypair.ini -iter 25
Copyright (c) 2021 Pedro F. Albanese <pedroalbanese@hotmail.com>
Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.