ciphers

Best way to handle block ciphers in C++? (Crypto++)

Good day :) I'm pretty new to both C++ and Block Cipher encryption, and I am currently in the process of writing a decryption function for AES (16 byte seed / 16 byte blocks). All is going well, but my total data size is not always a multiple of my block size. I'm wondering what the best way to handle left-over data at the end of my dat...

keyless ciphers of ROT13/47 ilk

Do you know of any other ciphers that performs like the ROT47 family ? My major requirement is that it'd be keyless. Thanks. ...

How can I disable weak Ciphers for Tomcat 5.5.27

Please let me know how can I disable weak Ciphers for Tomcat 5.5.27 ...

Beginner question about Caesar cipher in C++

To start off, I'm four weeks into a C++ course and I don't even know loops yet, so please speak baby talk? Okay, so I'm supposed to read a twelve character string (plus NULL makes thirteen) from a file, and then shift the letters backwards three, and then print my results to screen and file. I'm okay with everything except the shifting...

How would you design OO classes to handle cryptosystems and their keys

This a wider question than my previous one but related. I want to implement oldish crypto systems in Ruby such as ADFGVX, VIC cipher and others, mostly for fun. These cryptosystems are built on top of more general systems like substitution (monoalphabetic such as Caesar or polyalphabetic like Vigenere) and transposition (simple, double...

Which is the best encryption mechanism?

Triple DES or RC4? I have the choice to employ either one. ...

Determining Letter Frequency Of Cipher Text In Python

I am trying to make a tool that finds the frequencies of letters in some type of cipher text. Lets suppose it is all lowercase a-z no numbers. The encoded message is in a txt file I am trying to build a script to help in cracking of substitution or possibly transposition ciphers. Code so far cipher = open('cipher.txt','U').read() cip...

Which Cipher Suites to enable for SSL Socket?

I'm using Java's SSLSocket to secure communications between a client and a server program. The server program also serves up HTTPS requests from web browsers. According to "Beginning Cryptography with Java", page 371, you should always call setEnabledCipherSuites on your SSLSocket / SSLServerSocket to ensure that the cipher suite that e...

Using a caesarian cipher on a string of text in python?

I'm trying to slowly knock out all of the intricacies of python. Basically, I'm looking for some way, in python, to take a string of characters and push them all over by 'x' characters. For example, inputing abcdefg will give me cdefghi (if x is 2). Thanks! ...

multiplicative inverse?!?!?

Hi, I know that an affine cipher substitutes BD with SG. I need to find the encryption formula, in the form y = a x + b, where a and b are coefficients. From the information above I end up having to equations: a+b=18 and 3a+b=6 So I am working like this: a+b=18 and 3a + b = 6-> 3a+18-a=6->  2a= 6-18 -> 2a=14 (cuz it is mod 26) b=18-a ...

How does one set SSL ciphers when using CFSocket/CFStream in Cocoa?

I recently needed to configure CocoaHttpServer, which we're using in our application with success, to handle HTTPS connections coming from a client application (running on Android devices). This is fine - there is copious sample code which allows for this, and we were able to enable the secure server without issue. In practice we were s...

Decrypting a file in Java and exporting it to a file without going into infinite loops?

How do you decrypt a file in java and export it to a file without having to end up in an infinite loop if you have more than one user and password. Here is my code and at the end is my test file: import java.io.File; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOE...

"How to" for DataSnap Filters Compendium

Hello Folks, I'm trying to use Daniele Teti's Datasnap Filters Compendiun (the cipher ones) without success. Someone have a 'how to' for cipher filters for Datasnap? Regards. ...

OpenSSL server cipher selection

During an SSL/TLS handshake, the client sends up a list of supported cipher suites and the server selects which one to use for the conversation. Windows has a prioritized list of cipher suites (configurable via the registry) and will select the first suite in that list that is supported by the client. Once a list of acceptable ciphers ...

How do I improve breaking substitution ciphers programmically?

I have written (am writting) a program to analysis encrypted text and attempt to analysis and break it using frequency analysis. The encrypted text takes the form of each letter being substituted for some other letter ie. a->m b->z c->t etc etc. all spaces and non alpha chars are removed and upper case letters made lowercase. An exampl...

How to encrypt/decrypt a file in Java?

Hello, I am writing a Java application which can "encrypt" and consequently "decrypt" whatever binary file. I am just a beginner in the "cryptography" area so I would like to write a very simple application for the beginning. For reading the original file, I would probably use the java.io.FileInputStream class to get the "array of b...

Strongest cipher available to use with C/C++ ?

I am just wondering if you are supposed to write a sort of really secure application with data being transmitted over insecure networks, what kind of encryption algorithm will you use it in order to make it safe ? I know several c++ libraries for encryption providing nice functions with different algorithms, but i'm not quite sure which ...

Decrypting data from a secure socket

I'm working on a server application in Java. I've successfully got past the handshake portion of the communication process, but how do I go about decrypting my input stream? Here is how I set up my server: import java.io.IOException; import java.net.ServerSocket; import java.net.Socket; import java.util.ArrayList; import java.util.Hash...

Creating a shift cipher in Java

I want to create an applet where a user can enter a sentance then enter a shift and then the program incrypts the sentance using java. Any help? im new to java ...

OpenSSL: What does mean 'extra flags' in SSL_CIPHER to?

Hi, Looking into ssl.h\ s3_lib.c, I saw a change with the value of field in SSL_CIPHER, starting with OpenSSL 1.0: unsigned long algorithm2; /* Extra flags */ In the implementation (s3_lib.c), most of the ciphers use SSL_HANDSHAKE_MAC_DEFAULT|TLS1_PRF for this flag, when in previous versions it always was set to 0. What does it mea...