rc4 encryption module for android

Monkey Forums/User Modules/rc4 encryption module for android

Sub_Zero(Posted 2013) [#1]
Hi

A small but neat encryption module for android:

Create a folder called "rc4" in the modules folder.

Then name this file "rc4.monkey" and place it there:


Then, create n folder called "native" in the rc4 folder.
Name this file "rc4.android.java" and place it there:



There, the module is created...

Now for a example:



Enjoy :)


ImmutableOctet(SKNG)(Posted 2013) [#2]
A long while back RepeatUntil implemented a simple RC4 function in BlitzMax(You can find it in the BlitzMax code archives), here's a very direct port of it:

This function is similar to the pseudo-code implementation on wikipedia.


If anyone's interested in using this, you'll need to either modify the function, or use a wrapper for BlitzMax's procedural string-commands (Which came from Blitz Basic); I made Retro Strings a while ago, and it should do the job.

I use this myself (Well, more or less), and the only thing you really need to know is that this function both encrypts, and decrypts.

RC4 altogether is a somewhat basic, and fast encryption method; however, it has been cracked before, so you shouldn't rely on it too heavily. However, if you just want a quick and easy encryption method for strings, this'll work just fine.


Sub_Zero(Posted 2013) [#3]
A question: How and where was it cracked? :)

I thought it was somewhat secure, except how it was used in WEP encryption. Atleast the wikipedia page suggest so.

Just curious :)

Wikipedia: It is especially vulnerable when the beginning of the output keystream is not discarded, or when nonrandom or related keys are used; some ways of using RC4 can lead to very insecure cryptosystems such as WEP


http://en.wikipedia.org/wiki/Rc4

By the way: it has proved to be very secure in WPA.

EDIT: I removed something I thought was right, but was wrong....

Actually WPA and TLS isn't too secure anymore due to new attacks from 2013.

So without discarding the first bytes of the keystream and randomly padding the cleartext before encryption, rc4 won't be very secure. <-----EDIT! When it comes to using it as networking encryption where very much data is being transmitted back and forth...

When it comes to one-time encryptions (like encrypting your game-data or some piece of text) it is actually extremely secure!