Git Product home page Git Product logo

go-aes's Introduction

go-aes

This is my implementation of the Rijndael Algorithm (AES) in Go. It can encrypt and decrypt strings (yeah).

It was implemented using this spec: https://nvlpubs.nist.gov/nistpubs/fips/nist.fips.197.pdf

It uses github.com/urfave/cli as command line application framework.

Examples:

./go-aes encrypt 1234567887654321 "hello world"

Ciphertext (HEX): f33e4af222e89f54df51315093bd1168

Do not forget to set the -hex flag when decrypting hex values

  • ./go-aes -hex decrypt 1234567887654321 f33e4af222e89f54df51315093bd1168

Plaintext: hello world

It is also possible to set the key length, but it must be devidable by 32:

  • ./go-aes -klength 192 encrypt 111111112222222233333333 "hello world"
  • ./go-aes -klength 32 encrypt 1234 "hello world"
  • ./go-aes -klength 64 encrypt 12341234 "hello world"

You can also set the number of encryption rounds

  • ./go-aes -klength 64 -rounds 17 encrypt 12345678 McMurphey

Ciphertext (HEX): be3392467b39e2f825e6b8fb6403304a

Make sure to set the same number of rounds when decrypting

  • ./go-aes -klength 64 -rounds 17 -hex decrypt 12345678 be3392467b39e2f825e6b8fb6403304a

Plaintext: McMurphey

go-aes's People

Contributors

jannst avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.