/tsec

Type-safe general-cryptography library - https://jmcardon.github.io/tsec/

Primary LanguageScala

________________________________________  
\__    ___/   _____/\_   _____/\_   ___ \ 
  |    |  \_____  \  |    __)_ /    \  \/ 
  |    |  /        \ |        \\     \____
  |____| /_______  //_______  / \______  /
                 \/         \/         \/ 

Join the chat at https://gitter.im/tsecc/Lobby Build Status Latest Version

Latest Release: 0.0.1-M5

For the current progress, please refer to the RoadMap

For version changes and additions, including breaking changes, see either release notes or the Version Changes page.

0.0.1-M5 is here for scala 2.12+ and Cats 1.0.0-RC1!

To get started, if you are on sbt 0.13.16+, add

resolvers += "jmcardon at bintray" at "https://dl.bintray.com/jmcardon/tsec"

or (with the sbt-bintray plugin)

resolvers += Resolver.bintrayRepo("jmcardon", "tsec")
Name Description Examples
tsec-common Common crypto utilities
tsec-password Password hashers: BCrypt and Scrypt here
tsec-symmetric-cipher Symmetric encryption utilities! here
tsec-mac Message Authentication here
tsec-signatures Digital signatures here
tsec-md Message Digests (Hashing) here
tsec-jwt-mac JWT implementation for Message Authentication signatures here
tsec-jwt-sig JWT implementation for Digital signatures here
tsec-http4s Http4s Request Authentication and Authorization here

To include any of these packages in your project use:

val tsecV = "0.0.1-M5"
 libraryDependencies ++= Seq(
 "io.github.jmcardon" %% "tsec-common" % tsecV,
 "io.github.jmcardon" %% "tsec-password" % tsecV,
 "io.github.jmcardon" %% "tsec-symmetric-cipher" % tsecV,
 "io.github.jmcardon" %% "tsec-mac" % tsecV,
 "io.github.jmcardon" %% "tsec-signatures" % tsecV,
 "io.github.jmcardon" %% "tsec-md" % tsecV,
 "io.github.jmcardon" %% "tsec-jwt-mac" % tsecV,
 "io.github.jmcardon" %% "tsec-jwt-sig" % tsecV,
 "io.github.jmcardon" %% "tsec-http4s" % tsecV
)

IMPORTANT NOTE: About higher than 128-bit encryption key sizes on the JCA!

This applies to you if you are using any AES algorithms with higher than 128-bit key sizes

For 256-bit key sizes, you will have to install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy

You can get it at: http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html

You can refer to: https://stackoverflow.com/questions/41580489/how-to-install-unlimited-strength-jurisdiction-policy-files

Alternatively, if you are using a package manager like aptitude and have the java8 repositories on your machine, you can install oracle-java8-unlimited-jce-policy

For debian-like distros: Follow the instructions here then use:

sudo apt-get install oracle-java8-unlimited-jce-policy

Big Thank you to:

Robert Soeldner (Contributor)

Edmund Noble (For the dank tagless)

Fabio Labella (For the great FP help)

Christopher Davenport(Contributor)

Bjørn Madsen (Contributor)

Will Sargent (Security Discussions)