|
| 1 | +# GOST TLS |
| 2 | +[](https://github.com/pedroalbanese/engine/blob/master/LICENSE.md) |
| 3 | +[](http://godoc.org/github.com/pedroalbanese/engine) |
| 4 | +[](https://github.com/pedroalbanese/engine/releases) |
| 5 | +[](https://goreportcard.com/report/github.com/pedroalbanese/engine) |
| 6 | +[](https://golang.org) |
| 7 | +[](https://github.com/pedroalbanese/engine/releases) |
| 8 | + |
| 9 | +Cross-platform hybrid cryptography tool for shared key agreement (VKO), digital signature and TLS 1.2 for small or embedded systems. |
| 10 | + |
| 11 | +## Command-line Security Suite |
| 12 | + |
| 13 | + - GOST R 34.10-2012 public key signature function (RFC 7091) |
| 14 | + - VKO GOST R 34.10-2012 key agreement function (RFC 7836) |
| 15 | + - GOST R 34.11-2012 Streebog hash function 256/512-bit (RFC 6986) |
| 16 | + - GOST R 34.12-2015 128-bit block cipher Kuznechik (RFC 7801) |
| 17 | + |
| 18 | +### Supported ParamSets: |
| 19 | + - GOST R 34.10-2012 256-bit: A, B, C, D |
| 20 | + - GOST R 34.10-2012 512-bit: A, B |
| 21 | + |
| 22 | +## Features |
| 23 | +Cryptographic Functions: |
| 24 | + |
| 25 | + * Digital Signature (ECDSA-like) |
| 26 | + * VKO Shared Key Agreement (ECDH) |
| 27 | + * TLS 1.2 (Transport Layer Security) |
| 28 | + |
| 29 | +Non-cryptographic Functions: |
| 30 | + |
| 31 | + * Privacy-Enhanced Mail (PEM format) |
| 32 | + * RandomArt (OpenSSH-like) |
| 33 | + |
| 34 | +## Usage |
| 35 | +<pre> -512 |
| 36 | + Key length: 256 or 512. (default 256) |
| 37 | + -cert string |
| 38 | + Certificate name. (default "Certificate.pem") |
| 39 | + -ipport string |
| 40 | + Local Port/remote's side Public IP:Port. |
| 41 | + -key string |
| 42 | + Private/Public key, depending on operation. |
| 43 | + -paramset string |
| 44 | + Elliptic curve ParamSet: A, B, C, D. (default "A") |
| 45 | + -pkey string |
| 46 | + Generate keypair, Generate certificate. [keygen|certgen] |
| 47 | + -private string |
| 48 | + Private key path. (for keypair generation) (default "Private.pem") |
| 49 | + -public string |
| 50 | + Public key path. (for keypair generation) (default "Public.pem") |
| 51 | + -pwd string |
| 52 | + Password. (for Private key PEM encryption) |
| 53 | + -signature string |
| 54 | + Input signature. (verification only) |
| 55 | + -tcp string |
| 56 | + Encrypted TCP/IP Transfer Protocol. [server|ip|client]</pre> |
| 57 | + |
| 58 | +## Examples |
| 59 | +#### Asymmetric GOST2012 keypair generation: |
| 60 | +```sh |
| 61 | +./engine -pkey keygen [-512] [-paramset B] [-pwd "pass"] |
| 62 | +``` |
| 63 | +#### Parse keys info: |
| 64 | +```sh |
| 65 | +./engine -pkey [text|modulus] [-pwd "pass"] -key private.pem |
| 66 | +./engine -pkey [text|modulus] -key public.pem |
| 67 | +./engine -pkey randomart -key public.pem |
| 68 | +``` |
| 69 | +#### Digital signature: |
| 70 | +```sh |
| 71 | +./engine -pkey sign -key private.pem [-pwd "pass"] < file.ext > sign.txt |
| 72 | +sign=$(cat sign.txt|awk '{print $2}') |
| 73 | +./engine -pkey verify -key public.pem -signature $sign < file.ext |
| 74 | +echo $? |
| 75 | +``` |
| 76 | +#### VKO Shared key agreement: |
| 77 | +```sh |
| 78 | +./engine -pkey derive -key private.pem -public peerkey.pem |
| 79 | +``` |
| 80 | +#### Generate Certificate: |
| 81 | +```sh |
| 82 | +./engine -pkey certgen -key private.pem [-pwd "pass"] [-cert "output.ext"] |
| 83 | +``` |
| 84 | +#### Parse Certificate info: |
| 85 | +```sh |
| 86 | +./engine -pkey [text|modulus] -cert certificate.pem |
| 87 | +``` |
| 88 | +#### TLS Layer (TCP/IP): |
| 89 | +```sh |
| 90 | +./engine -tcp ip > PubIP.txt |
| 91 | +./engine -tcp server -cert certificate.pem -key private.pem [-ipport "8081"] |
| 92 | +./engine -tcp client -cert certificate.pem -key private.pem [-ipport "127.0.0.1:8081"] |
| 93 | +``` |
| 94 | + |
| 95 | +## License |
| 96 | + |
| 97 | +This project is licensed under the ISC License. |
| 98 | + |
| 99 | +#### Copyright (c) 2020-2023 Pedro F. Albanese - ALBANESE Research Lab. |
0 commit comments