31 votes

Encryption algorithm for an app

No. This is just a worse Caeser cypher. steps to break: Convert each string to an int in the output Subtract everything from the min output value - ord('A') ...
  • 3,512
30 votes
Accepted

A Caesar cipher in Python3

You say you're new to Python. Well, that's ok. And a Caeser Cipher is a good place to start since it's complex enough for an absolute beginner while easy enough to understand what goes on, why and ...
  • 12.8k
27 votes

AES Implementation in C++

Since there are only three valid key sizes for AES, it makes sense to not even let the AES class be instantiated with any uint16 value. I would introduce an enum ...
25 votes

Secure Encryption Algorithm

Since you asked for a feedback on the encryption algorithm, too. You are not specialized in cryptography. Do not even attempt to come up with a cryptographic algorithm unless you're doing it for fun ...
  • 498
23 votes
Accepted

AES Implementation in C++

I'm looking to improve the code to make it not "DIY-crypto-bad", if at all possible I work in security. This is not my area, but I have a non-zero amount of knowledge on implementing secure ...
  • 346
23 votes
Accepted

Fast symmetric key cryptography class

Here are a number of things you could do to improve the code. Separate interface from implementation The interface goes into a header file and the implementation (that is, everything that actually ...
  • 64.6k
18 votes
Accepted

Enigma Machine Simulation

Single responsibility principle A class should be responsible for one thing. The Enigma class is doing too much. It paints a graphical user interface, it works ...
  • 110k
18 votes
Accepted

Employing 3DES algorithm in Java

It's kind of secure, but it uses older algorithms. Although Benjamin correctly identifies 3DES, I would not call 3 key triple DES "broken". It still delivers a security of about 112 bits which nobody ...
18 votes

A Caesar cipher in Python3

I hate to provide an "answer only" code review, but I'd like to expand upon Mast's "Python comes batteries included" point: Python comes with a str.translate, ...
  • 32.2k
18 votes

A randomized encryption program

First, congratulations! Being able to produce something usable with another person is an incredibly important skill, and especially in programming. Please don't worry about the amount of suggestions ...
  • 8,747
17 votes
Accepted

Password hashing and matching

However, there is a lot of talk about what implementations are secure and not secure. How does my method measure up? Is it secure? Are there more secure methods in PHP for hashing tokens and matching ...
  • 12.8k
17 votes
Accepted

Homemade cyraz encryption algorithm

You are using in your code some non-standard loops. for (int i = 1; i <= streamFooter.Length; ++i) There should be a comment explaining why this loop is ...
  • 43.9k
16 votes

Naïve RSA decryption in Python

Simple does not mean fast, so you cannot judge performance based on how simple the implementation looks. Usually the most efficient way to perform a non-trivial task is not also the simplest way to do ...
  • 6,759
15 votes

Secure Encryption Algorithm

I know that Hosch250 has already covered naming but I think it's worth letting you in on a secret... Most programmers would prefer "stupid" code that is well written, with good naming and ...
  • 16.7k
15 votes

AES Implementation in C++

Interface Design: ...
  • 92.1k
15 votes
Accepted

Cryptographically Secure Password Generation in C

Overall, this is pretty well written. It's very easy to read and understand. I especially like that you annotated the usage() function with ...
  • 11.5k
14 votes
Accepted

Cryptographically-secure super-secret government message transaction machine

Well, I don't know much about PHP; but I know a little about security so that is what I am going to review. First I am going to review your encryption algorithm: AES-192. In June 2003, the U.S. ...
  • 21.7k
14 votes
Accepted

Implementation of the Jacobi Symbol in C

I am only looking for some feedback on my coding style. Formatting is good. I hope it is auto formatted. Respect the presentation width Rather than oblige a horizontal scroll bar, auto format to a ...
14 votes

Secrets management, operational security, keeping API tokens hidden while streaming

Your main is a classic arrow anti-pattern. You can use guard clauses to make the code flat and easier to understand. Bare excepts are normally not a good idea. Why ...
  • 41.7k
13 votes
Accepted

Simple password encryption / decryption in C++

Naming: I'm not very comfortable with your naming of variables and methods. Some are quite unclear. For instance: UString, Rid, ...
  • 17k
13 votes

Brute force MD5 password checker

MD5 md55 = System.Security.Cryptography.MD5.Create(); Do yourself a favor, an stick using System.Security.Cryptography; at the ...
13 votes

Enigma machine simulator - improving recursive algorithm performance

There have been several mentions of inefficiencies like using String everywhere here, but those are in fact, almost irrelevant compared to the big issue which you'...
13 votes
Accepted

Baconian Cipher Python Implementation

Bug Letters J & K, U & W, and V & X have the same pattern. This is not what the specification says: either I & J and U & V shares the same pattern, or none of the letters do. Style ...
13 votes

AES Implementation in C++

I think the header could be trimmed down a lot. The constant tables belong in the implementation file since they are not needed for the definition of the class. Since the AES class does not hold any ...
13 votes

Encryption algorithm for an app

In addition to Oscar Smith's answer why this code is not secure, here are a few nitpicks on your code itself: While it is legal to end a line with ; in Python, it ...
  • 40.6k
13 votes
Accepted

Data encryption with python

That seems like a very long method to splice and put together the string every even set of characters. You are essentially trying to build a square matrix using the characters from the given string. ...
  • 8,675
13 votes

Employing 3DES algorithm in Java

No, it's not secure. Your code is using Random instead of SecureRandom, which limits the entropy of the salt to 48 bits. In ...
13 votes

Fast symmetric key cryptography class

Please do not roll your own encryption outside of an academic context. If you would like a fast algorithm that can be easily implemented in C/C++ take a look at ChaCha or Salsa. Runs great on most ...

Only top scored, non community-wiki answers of a minimum length are eligible