Skip to main content
New
Stack Overflow Jobs powered by Indeed: A job site that puts thousands of tech jobs at your fingertips (U.S. only). Search jobs

Questions tagged [cryptography]

Questions relating to cryptographic topics such as encryption/decryption and hashing. (Not for use with trivial ciphers.)

Filter by
Sorted by
Tagged with
9 votes
1 answer
388 views

sha1sum implementation in C++

I rarely program C++ in anger, and considered myself somewhat rusty, and certainly not up to speed on C++11. For a bit of exercise, I thought I'd try implementing sha1sum, as wasn't really up to speed ...
1 vote
3 answers
103 views

Sign a message with a Bitcoin private key

I am writing code in C, and I need to do various operations with Bitcoin, from generating key pairs, to sign messages to post transactions. I found libraries for C++, but nothing in C that does all ...
2 votes
2 answers
216 views

Encrypt a String using AES in CBC mode

Your opinion interests me regarding this program. This program encrypts a text message using the AES256 algorithm and CBC. It allows the creation of an encrypted message that contains: The salt used ...
0 votes
1 answer
2k views

Encrypt and decrypt text using 256-bit AES-GCM

I'm working on building an encrypt/decrypt feature using AES, and a fixed AES 256-bit key size. I have decided on using AES-GCM, as it seems the most performant and secure. I would like to know ...
3 votes
1 answer
128 views

Encrypted websocket chat using AES (EAX) and RSA for signing

For learning purposes and because it really interests me I am trying to get a better understanding of cryptography by trying to make my own basic secure chat-application. I posted a first version of ...
3 votes
2 answers
223 views

Encrypting large files using RSA and AES-256-CBC-HMAC-SHA384

I developed an application that stores large files. Those files are stored in plain text. Now the project owner wants those files be encrypted on storage, he wants confidentiality, integrity, and ...
1 vote
1 answer
56 views

Random ladder for public-key encryption

...
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 ...
3 votes
1 answer
220 views

Encryption implementation for websocket chat (RSA + AES)

For learning purposes I am trying to make a encrypted chat in Python using Websockets. I am using AES and RSA to make it safe. The idea of the chat is that it's a group-chat. Users can join a chat by ...
2 votes
1 answer
78 views

An implementation of encryption cascade

I'm looking for feedback on some source code, I have everything documented and have corrected some errors. Looking to see what I did correctly, incorrectly, and what can be improved. ...
3 votes
1 answer
72 views

Implementation of aes-cbc-hmac combined with xchacha20-poly1305

I’m using two ciphers in this code that are in this order- encrypt plain text with xchacha20-poly1305 then encrypt the resulting ciphertext with aes-cbc-blake2b hmac. I was told elsewhere rather than ...
1 vote
1 answer
96 views

Password database: saving and loading encrypted files

I'm writing a password manager application, mostly with the goal of learning about proper handling of encryption. Here is my code responsible for encrypting/decrypting passwords and loading to/from ...
2 votes
2 answers
166 views

AES-GCM and AES-CBC-HMAC encryption methods

Looking for code reviews of these two encryption methods. And if GCM is better or worse than CBC with HMAC. AES-GCM ...
8 votes
1 answer
2k views

Golang crypto library: security

I've recently put together a library for working with Crypto in Go. I did not roll my own, I'm relying on stdlib for the core parts of this, but I would still like to get this reviewed by some ...
2 votes
1 answer
127 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 ...
6 votes
3 answers
147 views

Idiomatic and performant file hashing

I've written a small program that will accept a directory path and recursively calculate the MD5 hash of each file. ...
-3 votes
1 answer
272 views

Simplistic C program to encrypt and decrypt a string [closed]

I wanted to improve a crypter from internet. I found it poor and modified it. Do you like it? ...
2 votes
1 answer
143 views

Generate a valid private key from public key

Given a public key, I want to generate a corresponding private key. I know this will take at least decades or centuries on average to achieve. I am wanting to increase performance as my current code ...
2 votes
0 answers
165 views

Point addition on secp256k1. Exploring other alternatives for practical purposes

...
3 votes
1 answer
200 views

My Encryption Decryption Algorithm

I have been trying for so long to code an encryption/decryption algorithm using the modulus operator. Basically my code does a basic mathematical operation on given text and key then do a modulus 255 ...
5 votes
2 answers
2k views

SHA-256 Hash with a short string length in javascript

I think I've found a way to somewhat "compress" the length of a SHA-256 hash. I am doing some addition, so I wanted to know whether an approach like this is secure or not. ...
5 votes
1 answer
211 views

Hybrid encryption library for text/image encryption (additional feature implementation)

I am coding a hybrid encryption library that utilises AES and RSA to encrypt text/images, The library is working fine however I am wondering if I can make any improvements to it. I have included ...
9 votes
2 answers
909 views

RSA c implementation

This is my first attempt to implement a crypto algorithm. I am using C and gmp to interact with big numbers. I am basing my implementation of the RSA algorithm from the book "A handbook of ...
0 votes
0 answers
9k views

Simple AES encrypt/decrypt methods for .NET 6 and .NET Framework

I wrote some AES encryption/decryption methods with the following requirements: Inputs should be easy-to-use strings. Something encrypted in a .NET 6 app using these methods should be able to be ...
2 votes
1 answer
175 views

An evolutionary algorithm written in Java to crack an XOR cipher

Alright. So TryHackme is a website that tries to teach hacking with hands on labs. They have a room called JVM Reverse Engineering where the user gets to reverse engineer Java apps, and in particular ...
8 votes
1 answer
514 views

Improving the speed of an MD5 implementation from scratch in C++

I wrote an implementation of the MD5 hashing algorithm from scratch in C++, following the original RFC: https://www.ietf.org/rfc/rfc1321.txt . It works as expected, and the outputs match all the test ...
4 votes
0 answers
127 views

Securely generate Token for authentication

In my experience i had the need that some application (both desktop and web) can excange data to authenticate users (even if the data for authenticating users are not reacheable form desktop ...
5 votes
1 answer
3k views

Login system using bcrypt and MySQL, to be used for any future projects

Main function will ask what the user wants to do. LoginSystem class will handle the sign up and login process as well with the checking if password is right. passwordHashing will use bcrpyt to salt ...
0 votes
2 answers
937 views

Encryption and Decryption in C

I have written a program in C, which encrypts and decrypts a c-styled string (const char *) and print the result to stdout. It ...
0 votes
2 answers
3k views

AES GCM C++ implementation

I have written a C++ program that uses the Crypto++ library to encrypt files using AES-256Bit (in GCM mode). I am planning to eventually have the program store the keys for the files in a file e.g. ...
5 votes
1 answer
1k views

Rijndael Cipher in C++ (128bit AES)

I am a hobbyist and do not work in the industry, but I do have an interest in programming an cryptography. I decided to have a go at writing a 128bit implementation of AES in C++. This is my first ...
3 votes
2 answers
760 views

Encryption algorithm for chat app

I'm working on a CLI chat app using Python and I've coded this encryption algorithm. I used hybrid encryption. This uses an AES key as the shared key for encryption and decryption and RSA to encrypt ...
4 votes
1 answer
85 views

Mail Crypt CLI encrypted email wrapper for Gmail

I've spent the past few days writing a python based client that allows you to locally encrypt your message and send it through Gmail. The encryption scheme is based off of hybrid RSA/AES encryption, ...
3 votes
0 answers
336 views

Simple Merkle Tree

Discussion I just started learning about Merkle Trees and wanted to get some practice by attempting to implement a very simple Merkle Tree. The constructor for the tree takes some type of hash ...
3 votes
0 answers
101 views

Arduino portenta H7 compatible message encryption and decryption

I am looking to build a message encryption/decription method that would allow messages to be encrypted in a timely fashion on board an Arduino Portenta H7, using as much of the onboard hardware ...
2 votes
0 answers
68 views

Simple CLI File Encryption

This program is designed to work on the command line by piping stdin to stdout and encrypting or decrypting the input using a symmetric key. Any suggestions for improvement would be greatly ...
6 votes
2 answers
5k views

AES File Encryption / Decryption

I've been looking for a while for the right code to encrypt/decrypt files with AES in vb.net. I created the code below. Is this the right way doing AES encryption/decryption nowadays? ...
-3 votes
1 answer
119 views

Kotlin, calculate fingerprint from public key

I created function for calculating fingerprint from a public key ...
4 votes
5 answers
7k views

C++ AES Encryption Class

I am working with OpenSSL and writing an AES256 encryption module. My knowledge of cybersecurity is not vast and I would like to know whether there are any obvious holes I'm leaving. The intent is for ...
1 vote
1 answer
2k views

.Net BouncyCastle - PKCS#3, PKCS#8 & PKCS#10 Generation as base64

Reaserching BouncyCastle for C# is not for the faint of heart. After navigating an ocean of Java dead ends, I have arrived at the following code. I believe it's very useful for someone who wants to ...
4 votes
0 answers
128 views

RC4 stream cipher in ARM Assembly

Below is a complete implementation of RC4 in ARM assembly. Unit tests pass, including comparison to C implementation and to published test vectors. I'm appreciative of all feedback, comments (things ...
1 vote
1 answer
578 views

How do I make my program that creates RSA keys and encrypts and decrypts a file more secure

...
2 votes
2 answers
4k views

Encrypt string using One Time Pad

I'm trying to make it so that a string generates n keys, and all of those are required to recover the original string. For this, I generate n-1 random strings, XOR them all together with the original ...
1 vote
1 answer
535 views

Caesar Cipher, done in Ruby

It's an assignment from the Odin Project. Here's my implementation: ...
1 vote
0 answers
1k views

My implementation of the Signal protocol for end-to-end encryption in NodeJS and Angular [closed]

I have developed a web app which lets you transfer files from A device to B device, similar to airdrop's concept, working through the server and not peer-to-peer. I didn't go with a P2P solution ...
21 votes
4 answers
44k views

RSA algorithm implementation in Python 3

First, a reminder of the RSA algorithm and what my program implements: Take two distinct, large primes p and q Ideally these ...
6 votes
0 answers
481 views

Bash script for pull-mode backups via restic's rest-server

I wrote the following Bash scripts to make pull-mode backups with restic, a backup solution written in Golang, similar to Borg Backup. The main use case for this script is pulling backups into a ...
3 votes
2 answers
141 views

Correct implementation of encryption function

I wrote a simple encryption function that uses argon2d as the KDF and XChaCha20-Poly1305 as the AEAD. Since it is very easy to not get things right when dealing with encryption, I would appreciate if ...
2 votes
1 answer
3k views

Python 3 Playfair cipher encrypter and decrypter

I have written a Python 3 program that can encrypt and decrypt Playfair cipher, though I know it has been implemented countless times, none of the scripts I have seen so far(e.g. https://codegolf....

1
2 3 4 5
11