RC4 in cryptography is a widely used stream cipher. It's most common application is the WEP security algorithm. RC4 is fairly simple to understand and implement, on the other side, however, strong attacks on RC4 are known.
Questions tagged [rc4-cipher]
143 questions
1
vote
1 answer
How to find RC4 key from decrypted and encrypted data?
I have some dump analysis in a documentation showing a bunch of encrypted data, and the resulting decrypted data. The algorithm used is explained (simple RC4). The only piece of information missing is the key used to get from the encrypted to the…

kriss
- 23,497
- 17
- 97
- 116
0
votes
1 answer
Problems with encoding in RC4 Algorithm
I have to make a small demonstration about encrypting text using the RC4 Algorithm. To do so, I chose to use Java in NetBeans.
My code uses byte arrays for the permutation and the XOR operation. But the input and the output are to be in…

Marie
- 1
- 1
0
votes
1 answer
RC4 Algo with drop
How can I implement this fuction in C
void code_RC4(byte *Key, int key_size, byte *Message, int msg_size, int n)
The argument n will be the number of initial bytes not used during generation. (In other words, we wait for n generated bytes before…

Aziz Balde
- 3
- 3
0
votes
1 answer
Unknown ciphertext appended to decrypted plaintext
I'm using a RC4 stream cipher to encrypt/decrypt data sent through a Java UDP client-server program. My code works as intended on the host program and displays the correct plaintext and ciphertext, but when the data is sent over to the client via…

Zeffia
- 37
- 5
0
votes
1 answer
How to use SecureRandom instead of using hardcoded bytes array for Java AES Encrytion and Decryption?
In my code I am using hardcoded arrays(given below) for IV and key
**private static byte[] IVAes = { 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16 };
private static byte[] keyAes = { 0x01, 0x02,…

Pragya S
- 17
- 2
0
votes
0 answers
RC4 encrypting data when knowing how to decrypt it
Im currently working with an online API that sends me some users with a encrypted PIN that is encrypted with RC4. its sent in Hex(8) and ive managed to decrypt the hex into the int that it originally was, but i cant for the life of me reverse it to…

xguysOG
- 51
- 6
0
votes
1 answer
Additional characters in RC4 encryption
I am facing an issue when trying to encrypt a string using Open SSL RC4 function. Somme additionnal characters where added at the end of the encrypted string.
Here is my code :
RC4_KEY rc4_key;
QString key= "612c207468652066";
QByteArray…

yamilyana
- 11
- 4
0
votes
1 answer
Cant store encrypted Integer in Database
I am Developing a website using Laravel that accept Online payment with Credit card and this must be encrypted before storing into the database
I am Using RC4 Encryption to encrypt an integer then store it in my database
it throwing an error cause…

Kareem Tarek
- 3
- 1
0
votes
0 answers
TCL rc4 package
I wanted to learn how to use the TCL rc4 package .. the only documentation I can find are all just different sites with the same wiki, and the command example doesn't work.
Example:
% set keydata [binary format H* 0123456789abcdef]
% rc4::rc4 -hex…

dana
- 61
- 6
0
votes
1 answer
Connection fail in end user browser after disable weak ciphers and lower tls version in windows server
First I disable the following things in windows server 2016.
Triple DES cipher
RC4 cipher
TLS CBC Mode ciphers
TLS 1.0
TLS 1.1
Then, I reboot the server.
Finally, I call the web application which is hosted at above server from my client…

funbrain9
- 503
- 6
- 15
0
votes
0 answers
How to create a secret key based on a string in RC4 java using libraries
This the code to create a random secret key, but I am wondering, is there a way to create one based on a string like "hello"?
KeyGenerator kg = KeyGenerator.getInstance("RC4");
SecretKey k = kg.generateKey();

Astoach167
- 91
- 1
- 7
0
votes
2 answers
Can someone tell me how I use a RC4 key string to create the key again?
Please help me :(, I am trying this answer in this post Converting string to SecretKey
But it doesn't seem to be working for RC4, please tell me what I am doing wrong.
This is my RC4 class in a separate file:
public class RC4 {
SecretKey k;
…

Astoach167
- 91
- 1
- 7
0
votes
0 answers
Why is RC4 encrytion and decryption not working in java?
This is the RC4 encryption and decryption code in a java file, I got this from the answer of this post RC4 encryption java:
public class RC4 {
private final byte[] S = new byte[256];
private final byte[] T = new byte[256];
private final…

Astoach167
- 91
- 1
- 7
0
votes
1 answer
How to decrypt a HEX buffer with RC4?
I just can't seem to decrypt a hex buffer, which I'm pretty sure is encrypted with RC4 and which I'm pretty sure I know the key. Being a beginner in cryptography, I just want to make sure I'm actually doing everything right before starting to think…

Maxime Dupré
- 5,319
- 7
- 38
- 72
0
votes
1 answer
RC4 Encryption Function
I am trying to create a R function that will take a seed,and key length to generate a RC4 keystream.
The following is what I have so far:
library(numbers)
library(seqinr)
library(compositions)
rc4_genkey <- function(seed,keylength){
…

Zaid Islam
- 29
- 3