<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>crypto on Moritz Halbritter's personal blog</title><link>https://www.mkammerer.de/tags/crypto/</link><description>Recent content in crypto on Moritz Halbritter's personal blog</description><generator>Hugo -- gohugo.io</generator><language>en-US</language><lastBuildDate>Tue, 25 Aug 2020 12:57:04 +0200</lastBuildDate><atom:link href="https://www.mkammerer.de/tags/crypto/index.xml" rel="self" type="application/rss+xml"/><item><title>RSA on the JVM</title><link>https://www.mkammerer.de/blog/rsa-on-the-jvm/</link><pubDate>Tue, 25 Aug 2020 12:57:04 +0200</pubDate><guid>https://www.mkammerer.de/blog/rsa-on-the-jvm/</guid><description>This post shows how to work with RSA on the JVM with the Java language. We&amp;rsquo;re gonna:
Generate two keypairs (one for alice, one for bob) Save these keypairs to a file and load them again Send a message from alice to bob using a hybrid encryption scheme with confidentiality and authenticity Disclaimer: This post is intended to show the concepts underpinning a hybrid encryption scheme. This is not production ready code!</description></item><item><title>AES-CTR encryption with Java</title><link>https://www.mkammerer.de/blog/aes-ctr-encryption-with-java/</link><pubDate>Wed, 22 Apr 2020 17:27:58 +0200</pubDate><guid>https://www.mkammerer.de/blog/aes-ctr-encryption-with-java/</guid><description>And another post about my pet peeve &amp;ldquo;crypto stuff&amp;rdquo;. This time I want to encrypt something with the AES cipher in CTR mode.
The advantages of CTR are, quote wikipedia:
CTR mode &amp;hellip; also allows a random access property during decryption. CTR mode is well suited to operate on a multi-processor machine where blocks can be encrypted in parallel
But keep in mind that CTR isn&amp;rsquo;t an AEAD mode, meaning you have to secure the ciphertext with additional tamper proofing, e.</description></item><item><title>Encrypt Something With AES - How Hard Can It Be?</title><link>https://www.mkammerer.de/blog/encrypt-something-with-aes-how-hard-can-it-be/</link><pubDate>Mon, 07 Nov 2016 17:34:19 -0800</pubDate><guid>https://www.mkammerer.de/blog/encrypt-something-with-aes-how-hard-can-it-be/</guid><description>As it turns out - it&amp;rsquo;s hard. Cryptography is hard to get right, and the thing is: you probably won&amp;rsquo;t know if you got it wrong.
In this blog post I want to show a way to encrypt something in a secure way on the JVM, the language of my choice is Kotlin.
AES has multiple modes: ECB, CBC, GCM and more.
The easy way: GCM I&amp;rsquo;ll start with the simplest way to encrypt something with AES, using the GCM mode.</description></item><item><title>Curve25519 and AES-GCM on the JVM</title><link>https://www.mkammerer.de/blog/curve25519-and-aes-gcm-on-the-jvm/</link><pubDate>Tue, 29 Dec 2015 16:45:03 +0100</pubDate><guid>https://www.mkammerer.de/blog/curve25519-and-aes-gcm-on-the-jvm/</guid><description>I wrote a small project in Kotlin to demonstrate the use of ECC with Curve25519 on the JVM. After agreeing on a shared secret, it uses SHA-256 to derive a session key and encrypts the payload with AES-GCM.
If you&amp;rsquo;re interested in crypto, this may be something for you.
See this repository for the code.</description></item><item><title>A Java Keyczar Tutorial</title><link>https://www.mkammerer.de/blog/a-keyczar-tutorial/</link><pubDate>Fri, 06 Nov 2015 21:23:50 +0100</pubDate><guid>https://www.mkammerer.de/blog/a-keyczar-tutorial/</guid><description>In this post I&amp;rsquo;ll show you how to use Keyczar and Java to exchange messages between two parties in a secure way. Keyczar is a great library, but it lacks some documentation.
In this tutorial we use a SignedSession, that means: the sender and the receiver each has a key pair consisting of private and public &amp;ldquo;crypt&amp;rdquo; keys and a key pair of private and public &amp;ldquo;sign&amp;rdquo; keys. The crypt keys are used to encrypt/decrypt the message, the sign keys are used to sign/verify the message.</description></item><item><title>Using Google Keyczar With Gradle</title><link>https://www.mkammerer.de/blog/using-google-keyczar-with-gradle/</link><pubDate>Thu, 04 Jun 2015 20:11:18 +0200</pubDate><guid>https://www.mkammerer.de/blog/using-google-keyczar-with-gradle/</guid><description>Google Keyczar is a framework for cryptography in Java and other languages. Unfortunately they don&amp;rsquo;t upload their artefacts to Maven Central and don&amp;rsquo;t provide documentation on how to add Keyczar to your Maven or Gradle project.
To add Keyczar to Gradle, add the following in your build.gradle:
repositories { // ... maven { url &amp;#39;https://raw.githubusercontent.com/google/keyczar/master/java/maven/&amp;#39; } } dependencies { compile &amp;#39;org.keyczar:keyczar:0.66&amp;#39; } This adds the Keyczar Maven repository, which is hosted on GitHub and adds a dependency on Keyczar 0.</description></item><item><title>Secure password storage</title><link>https://www.mkammerer.de/blog/secure-password-storage/</link><pubDate>Sun, 05 Apr 2015 18:57:12 +0200</pubDate><guid>https://www.mkammerer.de/blog/secure-password-storage/</guid><description>I&amp;rsquo;ve written a blog post about secure password storage on the QAware blog, check it out if you are interested!</description></item></channel></rss>