Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
11 votes
3 answers
2k views

SHA-256 Implementation

I've been working on a byte-oriented SHA-256 implementation for educational purposes. I then tested it using the NIST CAVP tests found here. All tests pass but I would appreciate some feedback from a ...
dRevan25's user avatar
  • 113
2 votes
1 answer
132 views

Password recognition with cryptography

Since I only just learnt about this, I wanted some advice on better practices I can use when it comes to cryptography. Still learning python and hoping I can get this 'hashing' and 'salting' thing in ...
Beginner's user avatar
  • 189
4 votes
1 answer
179 views

Enigma Implementation by Python newbie

I want to learn Python, so I ported a C# Enigma implementation of mine. It got UnitTests and is running. I'm looking for a review, telling me, where I don't know best practices, where I break naming ...
Professore Saltzman's user avatar
4 votes
2 answers
203 views

Enigma Implementation by JAVA newbie

I want to learn Java, so I ported a C# Enigma implementation of mine. It got UnitTests and is running. I'm looking for a review, telling me, where I don't know best practices, where I break naming ...
Professore Saltzman's user avatar
2 votes
1 answer
1k views

Python script to compress and encrypt a list of files/directories (tar + gpg)

I've tried, as practise, to write a Python 3 script which takes a list of paths to files/directories and compresses them with tar, before encrypting the resultant ...
Marika's user avatar
  • 21
3 votes
3 answers
161 views

Creating a class and calling it from other .py files

My objective with this code was to create a class and call it from other .py files. The code itself is working, but I would like to know what could be improved or be better implemented. I wrote ...
zaratabata's user avatar
6 votes
2 answers
1k views

Python 3 Vigenere Cipher

I'm still fairly new to Python and I'm trying to see if I've efficiently used modules, functions, etc or if there's another/easier way to do something. This Python 3 Vigenere Cipher is a rebuild of a ...
Chimera.Zen's user avatar
7 votes
1 answer
315 views

Understanding RSA key generation and implementation in Java

Here is an attempt to leverage Java's BigInteger class to implement the RSA algorithm, as well as md5 and sha512 hashing functions to generate keys for what I hope to be strong cryptography. My prayer ...
Jonathan's user avatar
13 votes
2 answers
2k views

A randomized encryption program

I have just created an encryption program with a friend. I wanted to know if anyone here could give me back any feedback on it. Here is how the program works: Imagine you want to encrypt the word '...
Val198765's user avatar
  • 139
16 votes
3 answers
3k views

A Caesar cipher in Python3

This code basically just does a Caesar cipher on the contents of the variable "s" with a shift of 1. Sorry if the comments on the code don't explain it well. I'm quite new to Python and I'm not very ...
Erik D's user avatar
  • 163
5 votes
1 answer
1k views

Educational implementation of SHA256 in Rust

A few weeks ago I decided to have a look at the Rust programming language. After a few standard exercises I chose to try to implement the SHA256 hashing algorithm, because why not. The algorithm's ...
AlexV's user avatar
  • 7,270
11 votes
2 answers
2k views

Implementation of the Jacobi Symbol in C

I am new to C programming and wrote the following algorithm for the calculation of the Jacobi Symbol. Though there are some faster versions of this algorithm available I am only looking for some ...
3nondatur's user avatar
  • 213
5 votes
1 answer
72 views

High performance wrapper for CSPRNG arc4random(3)

This function is a wrapper for arc4random(3), a cryptographic pseudo-random number generator on macOS and BSDs, but you can also get it by installing ...
nalzok's user avatar
  • 513
5 votes
1 answer
168 views

First encryption program

This is the first piece of code that I write that's not just an exercise but a full program I can actually run. Features: Generate random letter/number pairs for each "printable" ASCII character ...
Clepsyd's user avatar
  • 233
2 votes
1 answer
553 views

Vigenère decoder/encoder in Python (using matrix)

I made an encoder/decoder for the Vigenère cipher. This one is using a table, not the remainder technique. Please let me know what you think can be done to improve performance, etc. ...
Nick's user avatar
  • 141
4 votes
1 answer
395 views

HKDF and compare constant time in Rust

I have implemented HKDF in Rust, which passes all test vectors from RFC 5869, using HKDF with HMAC-SHA256. I also have a function to compare byte arrays in constant time, which I hope someone could ...
user avatar
4 votes
1 answer
156 views

(Final)Simple Decryptor/Encryptor

This is my final version of my simpel Decrypter/Encryptor called Dencryptor. This is one of my first Python projects and I think it turned out pretty good. I am using a Caesar cipher right now and I ...
Barkork's user avatar
  • 125
7 votes
1 answer
617 views

HMAC with SHA256/512 in Rust

I've tried as best I can, to implement HMAC as specified in the RFC 2104. This is also my first Rust project, so the chances that rookie mistakes have been made are high. Since I'm fairly new to the ...
user avatar
4 votes
2 answers
201 views

File's encryption tool in terminal

I've created a wrapper for the SimpleCrypt library that allows to easily encrypt/decrypt a string. The application is used this : ...
IEatBagels's user avatar
  • 12.4k
2 votes
1 answer
559 views

Bash - script to encrypt pdf files using pdfencrypt

I wrote a small script to get around the issue when using pdfencrypt on the command line the password is always echoed as well as being saved to the 'history'. <...
nath's user avatar
  • 321
1 vote
1 answer
143 views

AES Java security

I am new to security and I was wondering if I can make my program better by changing or adding something to make it better/secure. Should I use a keyGenerator? I have my doubts from my program output....
Farid's user avatar
  • 11
3 votes
1 answer
2k views

Implementation of Ceaser's Cipher in Python

This is my implementation of a Ceaser's Cipher in Python using OOP principles. I'm looking for feedback for any code starting from the function build_shift_dict (...
ChrisIkeokwu's user avatar
1 vote
1 answer
856 views

Encrypting and decrypting strings using Caesar cipher

I was inspired by a solution in Think Python: How to Think Like a Computer Scientist. I structured mine (into two functions) according to it, and used the technique used in ...
Mahmood Muhammad Nageeb's user avatar
2 votes
1 answer
1k views

CUDA brute force 48 bit key

I have a cryptographic function with two 24 bit keys. I have two blocks of input and two blocks of output, and want to brute force the keys using CUDA. Overview: The function is composed to two ...
user avatar
1 vote
3 answers
3k views

Encryption algorithm using CTR mode

I am using CTR mode (it is a cipher in itself) in this code. I just wanted to see what you thought about it before I finish it. (Yes, I know that the plaintext length and key length must be highly ...
fraga11's user avatar
  • 27
4 votes
3 answers
6k views

Cipher decryption and encryption

I'm brand new to C# and I've started to make a cipher decryption program. The code works and runs fine, apart from the odd exception. I'm just looking for ways to improve my code and make more ...
James Cook's user avatar
7 votes
2 answers
17k views

Simplified DES encryption

This is one of my first Python scripts and I was wondering if it meets the correct conventions. Also are there things that you would write different? I am looking for some good comments so I can start ...
ßaron's user avatar
  • 95
10 votes
2 answers
371 views

Enigma machine simulator

As my first (keep that in mind!) Haskall program (full code at end) I've written a simple Enigma machine and would like feedback on the core code related to its stepping and encoding — stripped of ...
orome's user avatar
  • 401
4 votes
1 answer
4k views

Python mnemonic ↔ hex conversion (Bitcoin BIP39) - follow-up

Original question: Python PBKDF2 using core modules I'm looking for commentary on the following code, which converts from a hex seed to mnemonic (12 word phrase), and vice versa. It's for Bitcoin (...
Wizard Of Ozzie's user avatar
10 votes
1 answer
3k views

MD5 hash comparison for two folders

Using this page for a starting point into comparing MD5 hash values from files in two different folders, I've put something together that outputs either Copied if ...
user4317867's user avatar
6 votes
1 answer
1k views

Basic cryptography algorithm

I wrote 2 classes in order to implement some basic cryptography algorithm. I tried to use some object-oriented concepts of C++. I'm a beginner, so any comment or suggestion is welcome. First class: ...
youyou's user avatar
  • 177
10 votes
3 answers
4k views

Brute force MD5 password checker

I'm trying to create a C# brute force MD5 password checker. If I run it with "test1" without MD5, it completes in 15 seconds. I would like to make it faster, but I'm a c# beginner, and don't know how ...
n32303's user avatar
  • 293
13 votes
4 answers
3k views

FileScrambler, a command-line file encryption tool

I decided to try my hand at making an encryption utility, which I lovingly call "FileScrambler". FileScrambler allows the user to encrypt a file (a master-password list, personal diary, or whatever) ...
Gabe Evans's user avatar
3 votes
2 answers
9k views

Encryption with many algorithms using Crypto++

For the last few days I have been working on this code to develop a class that allow me to crypt a block of byte with many algorithme. One block will be divided into three equal blocks and every ...
xtensa1408's user avatar
7 votes
3 answers
115 views

Encrypt and backup folder to email daily, when online

I have a backup script which should backup a folder and send it to email. This should be done once a day. As this is on my laptop which is not online 24/7 I need to check that I am online and can send ...
Tomas Greif's user avatar
15 votes
6 answers
11k views

Small one time pad encryption program

This one time pad encryption program I have written (basically just an XOR "encryption" program) seems to be working fine, compiling nicely (gcc -o ./OTP.c), and doing what it's supposed to. However I ...
youjustreadthis's user avatar
8 votes
1 answer
584 views

RC4 in 8051 assembly optimization

I've been playing around with 8051 assembly lately and thought I would make a little project of implementing RC4, since it is pretty interesting and the algorithm doesn't seem too hard. Plus, taking <...
Scott Colby's user avatar
8 votes
2 answers
1k views

Generating a tabula recta

I want an experienced Haskeller to critique my code and offer changes/suggestions (so I can learn the idioms of the language and culture around Haskell). I've been using a Tabula Recta for my ...
Ixmatus's user avatar
  • 235
5 votes
2 answers
3k views

Encryption/decryption of data

I'm trying to work with some encryption/decryption of data. It was some hard work for me to get it working with some buffers and what not. This is the code I came up with: ...
SimonLanghoff's user avatar