A RSA Cipher implementation for Kotlin/Java

Overview

RSA4K

A RSA Cipher implementation for Kotlin/Java.

Discord

GitHub last commit GitHub commit activity
GitHub code size in bytes GitHub contributors

Usage

Import

Replace ${version} with the current version!

Gradle KTS
repositories {
    maven("https://jitpack.io")
}

dependencies {
    implementation("com.github.Lyzev:RSA4K:${version}")
}
Gradle Groovy
repositories {
	maven { url 'https://jitpack.io' }
}

dependencies {
    implementation 'com.github.Lyzev:RSA4K:${version}'
}
Maven

    
        jitpack.io
        https://jitpack.io
    



    
        com.github.Lyzev
        RSA4K
        ${version}
    

Raw Jar
  1. Go to the release page.
  2. Download RSA4K-${version}-all.jar.
  3. Add the jar to your classpath.

Example

${keys.first.exp}") println("public modulus -> ${keys.first.mod}") println("private exponent -> ${keys.second.exp}") println("private modulus -> ${keys.second.mod}") println("encrypted -> $encrypted") println("decrypted -> $decrypted") }">
fun main() {
    val keys = RSAKeyFactory.genKeyPair()
    val cipher = RSA(keys.first, keys.second)
    val msg = "Test"

    val encrypted = cipher.encrypt(msg.encodeToByteArray())
    val decrypted = String(cipher.decrypt(encrypted!!))

    println("public exponent -> ${keys.first.exp}")
    println("public modulus -> ${keys.first.mod}")
    println("private exponent -> ${keys.second.exp}")
    println("private modulus -> ${keys.second.mod}")
    println("encrypted -> $encrypted")
    println("decrypted -> $decrypted")
}

Documentation

You can find the documentation here.

Code Quality Monitoring

You can find the qodana report here.

Bugs and Suggestions

Bug reports and suggestions should be made in this repo's issue tracker using the templates provided. Please provide as much information as you can to best help us understand your issue and give a better chance of it being resolved.

Disclaimer

Please note that this repository is for educational purposes only. There may be some security issues, because the author isn't a professional cryptologist. It's recommend to use the rsa implementation of java.

You might also like...
A program analysis tool to find cryptographic misuse in Java and Android.

A program analysis tool to find cryptographic misuse in Java and Android.

CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

CRYLOGGER: Detecting Crypto Misuses for Android and Java Apps Dynamically

Java bytecode obfuscator created by x4e.

Binscure Java bytecode obfuscator created by x4e. Usage First, create a config file, (example config here). When you have a config file, run binscure

Appdbg - make it possible to run android dex file in original Java Virtual Machine
Appdbg - make it possible to run android dex file in original Java Virtual Machine

Appdbg - make it possible to run android dex file in original Java Virtual Machine

Soot - A Java optimization framework

Using Soot? Let us know about it! We are regularly applying for funding to help us maintain Soot. You can help us immensely by letting us know about p

Find Security Bugs is the SpotBugs plugin for security audits of Java web applications
Find Security Bugs is the SpotBugs plugin for security audits of Java web applications

The SpotBugs plugin for security audits of Java web applications and Android applications. (Also work with Kotlin, Groovy and Scala projects)

Catch common Java mistakes as compile-time errors

Error Prone Error Prone is a static analysis tool for Java that catches common programming mistakes at compile-time. public class ShortSet { public

๐Ÿ”“ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.
๐Ÿ”“ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.

๐Ÿ”“ Kotlin version of the popular google/easypermissions wrapper library to simplify basic system permissions logic on Android M or higher.

A collection of Kotlin Multiplatform Mobile cryptographic hashing functions.

crypto A collection of Kotlin Multiplatform Mobile libraries to aid in mobile app development. cryptohash: A set of cryptographic (and not so cryptogr

Releases(1.2)
Owner
Lyzev
I am a developer which is interested in security and general programming.
Lyzev
Smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation

About smali/baksmali is an assembler/disassembler for the dex format used by dalvik, Android's Java VM implementation. The syntax is loosely based on

Ben Gruver 5.7k Dec 27, 2022
enjarify 8.6 0.0 L5 Python Enjarify is a tool for translating Dalvik bytecode to equivalent Java bytecode. This allows Java analysis tools to analyze Android applications.

Note: This repository may be out of date. Future development will occur at https://github.com/Storyyeller/enjarify. Introduction Enjarify is a tool fo

Google 2.7k Jan 8, 2023
CLI tool for decompiling Android apps to Java. It does resources! It does Java! Its real easy!

Easy-as-pie Android Decompiler Why One stop shop I got pretty tired of decompiling Android apps with a bunch of steps that I had to remember all the t

Alex Davis 619 Dec 27, 2022
simple implementation KTLint with lib JLLeitschuh/ktlint-gradle

Simple DETEKT implementation others KTLint KTLint-gradle DeteKT Spotless gradle-code-quality-tools-plugin Tutorials medium Config detekt config.yml Gr

John Alves 0 Jun 10, 2022
Signal Protocol library for Java/Android

Overview A ratcheting forward secrecy protocol that works in synchronous and asynchronous messaging environments. PreKeys This protocol uses a concept

Signal 1.8k Dec 24, 2022
Grabโ€™n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Grabโ€™n Run, a simple and effective Java Library for Android projects to secure dynamic code loading.

Luca Falsina 418 Dec 29, 2022
TweetNaCl in Java - a port of TweetNaCl-js

TweetNacl in Java: port of tweetnacl-js API/Usage Suggest always use TweetNaclFast implementation Public key authenticated encryption get key pair: Bo

AppNet.Link 40 Nov 10, 2022
Dex to Java decompiler

JADX jadx - Dex to Java decompiler Command line and GUI tools for producing Java source code from Android Dex and Apk files Main features: decompile D

null 32.8k Jan 2, 2023
Analyze any Android/Java based app or game

ClassyShark Introduction ClassyShark is a standalone binary inspection tool for Android developers. It can reliably browse any Android executable and

Google 7.2k Jan 3, 2023
A Java ePub reader and parser framework for Android.

FolioReader-Android is an EPUB reader written in Java and Kotlin. Features Custom Fonts Custom Text Size Themes / Day mode / Night mode Text Highlight

FolioReader 2.1k Jan 3, 2023