Last call to make your voice heard! Our 2022 Developer Survey closes in less than a week. Take survey.

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
0 votes
2 answers
55 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. ...
user avatar
  • 11
3 votes
2 answers
85 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 ...
user avatar
  • 27
2 votes
0 answers
48 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 ...
user avatar
  • 1,825
0 votes
2 answers
77 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 ...
user avatar
4 votes
1 answer
113 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 ...
user avatar
3 votes
0 answers
29 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 ...
user avatar
  • 131
2 votes
0 answers
54 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 ...
user avatar
-3 votes
1 answer
49 views

Kotlin, calculate fingerprint from public key

I created function for calculating fingerprint from a public key ...
user avatar
4 votes
0 answers
56 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 ...
user avatar
0 votes
1 answer
49 views

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

...
user avatar
1 vote
1 answer
148 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 ...
user avatar
4 votes
5 answers
3k 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 ...
user avatar
  • 41
1 vote
0 answers
197 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 ...
user avatar
3 votes
0 answers
110 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 ...
user avatar
  • 323
2 votes
1 answer
841 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....
user avatar
1 vote
1 answer
46 views

Notes Saver Application in tkinter python

I completed my Notes Saver project in python tkinter and now I want to get it reviewed. I want to how I could - Improve my hashing system. Improve my notes encryption system. Improve the UX. Improve ...
user avatar
2 votes
1 answer
91 views

Manual authenticated encryption on .NET Core

I've been tasked with creating some way to encrypt arbitrary text for a .NET Core app, with the following requirements: Messages will be between 10 bytes and 1 kB. Boss doesn't want me to use AES-GCM ...
user avatar
  • 195
4 votes
1 answer
92 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 ...
user avatar
4 votes
2 answers
118 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 ...
user avatar
3 votes
2 answers
384 views

Is this a true implementation of XOR in python?

I have implemented a simple XOR encryption in Python. However I am not sure this is the right implementation or it can be further improved ? ...
user avatar
  • 509
4 votes
1 answer
101 views

Cryptographic hashing class using OpenSSL's EVP interface

I have written a cryptographic hashing class named Ccksum::DigestHasher that allows the caller to select a hashing algorithm by name via OpenSSL's EVP interface. ...
user avatar
2 votes
1 answer
90 views

encrypt files using a variant of Vernam Cipher in C language

I'm coding this program that allows you to encrypt files using vernam cipher in C language. I would be glad if you could inspect my code and tell me if I can make some improvements to it or if there ...
user avatar
  • 21
1 vote
0 answers
317 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 ...
user avatar
  • 11
1 vote
1 answer
36 views

tokenize char array with PolarSSL library

I'm trying to perform a decryption operation using RSA. I'm using the PolarSSl library. I have a char array key[] that contains RSA private key like the following, <...
user avatar
2 votes
0 answers
33 views

Javascript client storage with the same persistence as a session cookie

I want to implement a client storage mechanism that is as persistent as a session cookie but with more storage capacity. I am doing this by encrypting the data before storing it and saving the keys in ...
user avatar
  • 121
0 votes
1 answer
186 views

Encryption/Decryption algorithm #3

This is a follow up question to Encryption/Decryption algorithm #2 and Encryption/Decryption algorithm. In my last question, in @Reinderien's answer, he added this line ...
user avatar
2 votes
1 answer
124 views

Encryption/Decryption algorithm #2

This is a follow-up question to this one. I have tried to implement all the recommended things in the answers (except commenting, and not being OS specific). Again, if you see anything that needs ...
user avatar
3 votes
3 answers
106 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 ...
user avatar
1 vote
1 answer
97 views

A simple encryption scheme 2.0

This is a follow up to my previous post. I've used a BCrypt library to create a key from the passed in password. I then separated out the salt from the hash. The encryption is done using the salt ...
user avatar
4 votes
2 answers
532 views

.Net core string symmetric encryption

I need to store sensitive strings in DB, so decided to encrypt it in a DB and decrypt it at the application layer. And noticed that it is not so easy to find ready to use an example. Please check my ...
user avatar
  • 185
1 vote
1 answer
705 views

Encrypted text - C# SHA256, implementation

I have a C# application which needs to encrypt string and save the key as a hash. The key is saved as a hash to check the right key has been input before trying to decrypt the message. First, I have ...
user avatar
5 votes
3 answers
648 views

Caesar Cipher Encryption / Decryption in Python

I'm trying to write a Python program to predict the most likely substitution for a Caesar cipher. I managed to get it working, but it just seems very clunky and slow, especially because I need to ...
user avatar
2 votes
2 answers
104 views

Encrypting/decrypting messages in java

I am trying to implement message encryption/decryption with password in java. Here is the code I'm using: ...
user avatar
2 votes
1 answer
440 views

JavaScript: proper user of SJCL encryption in Google Apps Script

I'm using the minified version of SJCL to encrypt the backup files requested by the users. It is in a Google Apps Script add-on for Google Sheets. I'm mostly concerned with correct use, exception ...
user avatar
3 votes
2 answers
123 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 ...
user avatar
6 votes
2 answers
1k views

AES implementation in python

For educational purposes, I have implemented the AES block cipher in python. I decided to follow the interface for block cipher modules as defined in PEP 272. The implementation consists of two python ...
user avatar
  • 690
3 votes
2 answers
510 views

Encryption/Decryption between Python and Node JS

I have created a Python & Node JS encryption/decryption AES 256-CFB. The point of this little project is that I will encrypt a special URL with Python covered with base64 & URL encoding and ...
user avatar
5 votes
4 answers
1k views

Vigenere cipher C program

I implemented a Vigenere cipher that preserves case and can also decrypt if you pass the -d argument. Usage is ...
user avatar
  • 151
3 votes
3 answers
435 views

Substitution Cipher in C

I was directed here from Stack Overflow. I completed my recent programming assignment for developing a substitution cipher in C. Below is what I came up with after reading many tutorials, googling ...
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 ...
user avatar
3 votes
0 answers
75 views

Implement kleptography in Python

I'm new here, therefore I hope to be clear in this question. Firstly, I want to underline that I'm not a programmer, and I attended only a beginner course in Python, but I like to solve problems ...
user avatar
3 votes
1 answer
455 views

Very simple encryption API

I need an encryption system with a super simple API. I'd prefer something as simple as the following. The output should also be browser-friendly and ideally url-friendly. ...
user avatar
3 votes
2 answers
438 views

Encrypts a message using the ADFGVX cipher

This is a Java program I implemented to encrypt a string using the ADVGVX cipher. It takes in the message, the passphrase used to generate the Polybius square, and keyword for the transposition part ...
user avatar
  • 131
3 votes
0 answers
170 views

C++ Crypto: Part 4- Scram

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
user avatar
  • 91.5k
3 votes
1 answer
260 views

C++ Crypto:Part 3-pbkdf2

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
user avatar
  • 91.5k

1
2 3 4 5
10