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
62
votes
10 answers
Convert python long/int to fixed size byte array
I'm trying to implement RC4 and DH key exchange in python. Problem is that I have no idea about how to convert the python long/int from the key exchange to the byte array I need for the RC4 implementation. Is there a simple way to convert a long to…

cdecker
- 4,515
- 8
- 46
- 75
8
votes
1 answer
RC4 doesn't work correctly with openssl command?
I need to encode the result of a execution with RC4. Before to do the bash script, I'm testing how to crypt the data.
I'm using the next command:
echo -ne "test" | openssl rc4 -k test -nosalt -e -nopad | xxd
And the output is:
0000000: bdb1 7f03 …

user1042850
- 125
- 3
- 9
8
votes
2 answers
Different output from toBase64() in CFML on 2 different machines
FINAL EDIT: SOLVED, upgrading local dev to railo 3.3.4.003 resolved the issue.
I have to RC4 encrypt some strings and have them base64 encoded and I'm running into a situation where the same input will generate different outputs on 2 different dev…

vector
- 7,334
- 8
- 52
- 80
6
votes
6 answers
RC4 encryption java
Hi there I am trying to implement the RC4 algorithm in Java. I found this code as an example that help me to understand the idea:
public class RC4 {
private int[] S = new int[256];
private int[] T = new int[256];
private int keylen;
public…

Ronaldinho Learn Coding
- 13,254
- 24
- 83
- 110
5
votes
2 answers
openssl command line to cipher RC4, not expected result, don't understand
this is probably a stupid question, but I cannot figure it out.
Currently, I am using this website: http://www.fyneworks.com/encryption/rc4-encryption/ to cipher rc4 for a proof of concept. For instance, I am entering 'a' as a cleartext, 'a' as a…

I am ttt
- 131
- 1
- 6
5
votes
2 answers
Is there anything wrong with this RC4 encryption code in C#
I am trying to listen to the Foxycart XML Datafeed in C# and running into an issue which boils down to encryption.
In short, they send over their data as encoded and encrypted XML using RC4 encryption.
To test, they have some (user submitted)…

leora
- 188,729
- 360
- 878
- 1,366
5
votes
2 answers
WEP (Shared Key Authentication), how is the 136 byte challenge response formed?
I am playing around with WEP(Shared key authentication) challenge/response mechanism at the moment and I hope someone could help me out.
The AP sends a challenge text to the STA. The challenge text is 128 bytes
The STA encrypts the challenge and…

Si.
- 81
- 6
5
votes
1 answer
NodeJS Crypto with RC4 yields blank
I have a php function that generates an RC4 encrypted string. I would like to decode that string using Node - ideally using the built in Crypto module. But I am unable to do so - I just get a blank string.
The PHP code is here…

cyberwombat
- 38,105
- 35
- 175
- 251
4
votes
1 answer
Emulate openssl rc4-40 in "plain" perl
I have been trying for a couple of hours without much luck though I suspect this is just me being dense.
First the setup so you won’t try talk me out of it. :P I have a box which has restrictions on its openssl lib such that it will not do rc4 in as…

Ashley
- 4,307
- 2
- 19
- 28
4
votes
3 answers
Secure communication between arduino and PHP using RC4 and base64
I'm trying to make a mildly secure communication between Arduino and PHP. I can not use SSL for lack of power on the Arduino. So I wanted to use RC4 to encrypt data from PHP, and receive into the Arduino and decrypt. also encrypt from the Arduino…

Michael Paleo
- 111
- 3
- 6
3
votes
1 answer
Skipping / seeking to position with RC4 encryption
I have this problem when I want to "skip" to a position while streaming an encrypted video
So what I have is:
An http streaming server (local, running on the Android device)
the native android Media Player
RC4 encryption utility
Basically, I'm…

josephus
- 8,284
- 1
- 37
- 57
3
votes
1 answer
Android - Use RC4 with Cipher
So, how do I do it? Can't find any example anywhere that successfully uses RC4.
Also, doing cipher = Cipher.getInstance("RC4"); returns a NoSuchAlgorithm exception

josephus
- 8,284
- 1
- 37
- 57
3
votes
1 answer
Which Cipher Suites Algorithm Are Supported in Jdk11 and Which One is Best to Use with TLSv1.2
I am running my JDK8 application in JDK11 enviroment.
I am using TLSv1.2 and TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384 cipher suite algorithm which i am suspecting that it is not supported or disabled in JDK11.
There are list of ciphers which are…

Keshav Soni
- 41
- 1
- 1
- 6
3
votes
0 answers
Enabling AES_128_CBC and RC4_128 for JDBC connections to MS SQL Server 2005
To ensure backward compatibility of my application, I'm testing JDBC over TLS behaviour when an MS SQL Server version vulnerable to CVE-2011-3389 is used (any 2005, or 2008/2008R2 w/o service packs fit). In theory, two options are available:
either…

Bass
- 4,977
- 2
- 36
- 82
3
votes
0 answers
RC4 Decodeing Using PHP
I am trying to decode the rc4 encoded value using follwong function.
function rc4($key, $data){
// Store the vectors "S" has calculated
static $SC;
// Function to swaps values of the vector "S"
$swap = create_function('&$v1, &$v2',…

Sid
- 108
- 1
- 1
- 5