DOPE

Doxr Open Protocol Encryption

Context

This is an asymmetric encryption method that I made from "scratch," for fun/learning. Fundamentally, it is RSA but with my own methods implementation details. I ended up calling the end result DOPE.

Now obviously, it's not the most secure thing out there, and a lot of features that make actual RSA so great and widely implemented aren't probably something that DOPE has.

But I'm still low-key proud of it since this is my first time making something like this.


You can check the GitHub Repo for more details.

General Implementation Steps

This is a surface level step-by-step list to generate the certificates.

  1. Generate primes (run lightweight tests on them so stuff can be eliminated without going through Modular Exponentiation)
  2. Miller-Rabin test
  3. Generate the N value
  4. Choose a suitable e value
  5. Calculate the d value based on previous variables
  6. Generate a string that follows the DOPE certificate format: these can be processed and used by DOPE.

This is obviously skipping a lot of stuff that is used to make DOPE more efficient and a lot less intensive. For more information, see the GitHub repo.

Try It Out

Note! The message cannot be too big, as there is a limit; the numerically encoded message's value cannot be greater than N, otherwise, the remainder gets messed up during the process and the true message is lost. It is possible to fix this issue through chunking messages but that wasn't implemented.

Input your certificates

Prime lengths:

Input a string