This tag is used for topics relating to cryptographic questions such as encryption/decryption and hashing.

learn more… | top users | synonyms

2
votes
1answer
60 views

RC4 implementation in Go

I'm new to Go, and as a learning project I've been implementing RC4, attempting to follow pseudo-code in the Wikipedia links (and trying not to look at the far-superior version in the crypto package). ...
2
votes
2answers
116 views

Hashing passwords for website is this secure

I have spent about 2 weeks reading about hashing passwords and website security. As there seems to be many different ways to achieve this, I'm a bit confused as to whether my code is secure. Can ...
2
votes
1answer
38 views

Code Review of Haskell PBKDF2

Moved from Programmers.SE. I have written a new version of the PBKDF2 algorithm in Haskell. It passes all of the HMAC-SHA-1 test vectors listed in RFC 6070, but it is not very efficient. How can I ...
1
vote
1answer
46 views

Better ways of solving the substitution cipher puzzle

here is the puzzle description Your task is to decode messages that were encoded with substitution ciphers. In a substitution cipher, all occurrences of a character are replaced by a different ...
1
vote
2answers
113 views

Is my cipher secure?

This is a program that I made for encrypting text files, it uses a one time pad cipher to encrypt the files, but I do not know if there are any holes in my program that could be a vulnerability. ...
1
vote
0answers
147 views

JavaScript xor function

I made simple JavaScript xor function. It accepts string, numeric array and mixed array (char, string, num) as params. It returns string or an array. Returning an array is a must!. All numbers are ...
1
vote
0answers
41 views

Review streamed encrypt then mac construction

I've been porting python Keyczar to work under 2to3 conversion (Github). I wanted to consolidate it's streaming aes encrypt/decrypt backend interface with it's string decrypt/encrypt. So I wrote a new ...
3
votes
2answers
119 views

Nice design of my hash service class

I would like to know, if my design of this class is good OOP. Should I implement for every hash algorithm a separate class? I'm asking this, because the HashService can be used with a ...
0
votes
1answer
189 views

Review my Diffie Hellman class

Here is a link to my project, more details regarding the Diffie Hellman Key Exchange using MODP cyclic grous are available here, no ECP currently implemented ...
2
votes
1answer
362 views

Simple crypto library in Python - correct and secure?

Apologies if this is too broad. Is the code below (also available at github with tests, example, and description of algorithms) correct and secure? It follows the recommendations at ...
2
votes
1answer
89 views

1024 bit key generation in php

I want to use this function to store 1024 bit keys in my Mysql database. If you call generateKey(128), you'll get a 128 byte string, same as 1024 bit string. I want to know if there is something wrong ...
1
vote
1answer
101 views

What can I improve in this Java based crypto code?

I use some basic cryptography in a project of mine. Because I want my application to run cross-platform and because it seems pretty sophisticated I decided to go with the Java Cryptography ...
2
votes
1answer
2k views

Playfair Cipher Code Review C++

I have been working on a Playfair Cipher in C++ for a final Project in a Cryptography class. I was hoping for some feedback on the project so far. I Recently got a job programming before I've even ...
1
vote
2answers
347 views

Modular exponentiation optimisation in Java

As part of an assignment in Cryptography I've been asked to write code that involves calculating modular exponentiation. The BigInteger modPow is not allowed in this case, we have to implement it ...
5
votes
1answer
1k views

Using System.Security.Cryptography.ProtectedData, do you see any issue with encryption and encoding?

The application needs to keep a secret which is known to logged in windows user. User enters secret in windows form's text box which is read by application. This is in form of System.String. Now I ...
19
votes
0answers
2k views

Review of simplified secure encryption of a String

I have two code examples that I wrote for best practices encrypting a string that I'm looking for feedback both in terms of best practices and security. They are both using authenticated encryption. ...
3
votes
1answer
3k views

DES, Triple DES and AES-128 code in Java

I wrote below code to crypt and decrypt some bytes in three algorithm with Java but I do not know if I wrote them in correct mode or not. Please tell me about truth of code. First class: public ...
3
votes
1answer
387 views

Cryptographic key exchange

I initially posted this on StackOverflow, and was redirected here. I have been playing around with Bouncy Castle (Java) for the last few days, and I've reached the point where I believe I can securely ...