[C#]qCrypt - Open Source Encryption
qCrypt - One side encryption. It's kinda hard to decrypt it. Although if used small amount of letters it's not so hard. Very basic encryption. Feel free to modify/improve it and upload of course so everyone can see. :thumbup:
Screenshot: http://img337.imageshack.us/img337/4745/66454548.png
Download: http://yy.lv/download.php?f=69738
Example:
I love RaGEZONE -> 67937422414128769424316766586502
I iove RaGEZONE -> 43694397774867024729779803447143
Main Form
PHP Code:
namespace qCrypt
{
public partial class frmMainForm : Form
{
public frmMainForm()
{
InitializeComponent();
}
private void buttonEncrypt_Click(object sender, EventArgs e)
{
Encrypt.StartEncryption(textBoxUncrypted.Text);
textBoxEncrypted.Text = Encrypt.ReturnString();
}
}
}
Encrypt
PHP Code:
namespace qCrypt.Classes
{
static class Encrypt
{
static string FinalIntegers;
static string EncryptText;
static int[] MyIntArray = new int[32];
public static void StartEncryption(string MyText)
{
//Uppering it just in case.
MyText = MyText.ToUpper();
//Making these strings empty.
FinalIntegers = string.Empty;
EncryptText = string.Empty;
//Main loop where checking each letter.
for (int i = 0; i < MyText.Length; i++)
{
if (MyText[i] == 'A')
{
EncryptText = "67147804386935659614295334925265";
}
if (MyText[i] == 'B')
{
EncryptText = "40234261117512095921888831693698";
}
if (MyText[i] == 'C')
{
EncryptText = "25554594088772765822059033491034";
}
if (MyText[i] == 'D')
{
EncryptText = "49257666344761728762503183692300";
}
if (MyText[i] == 'E')
{
EncryptText = "92345676992698286431550173278515";
}
if (MyText[i] == 'F')
{
EncryptText = "93726526035464017048882091246568";
}
if (MyText[i] == 'G')
{
EncryptText = "24590313462079242595407758509550";
}
if (MyText[i] == 'H')
{
EncryptText = "83759930172522751880516343255280";
}
if (MyText[i] == 'I')
{
EncryptText = "90291595376905753003909888385940";
}
if (MyText[i] == 'K')
{
EncryptText = "37127880863226049166796151709548";
}
if (MyText[i] == 'L')
{
EncryptText = "71461042420384157122852407900801";
}
if (MyText[i] == 'M')
{
EncryptText = "58006678924036605768805688980313";
}
if (MyText[i] == 'N')
{
EncryptText = "12447122735386729167866363617985";
}
if (MyText[i] == 'O')
{
EncryptText = "36141394090474783907420403818251";
}
if (MyText[i] == 'P')
{
EncryptText = "99248304649302231675368493493475";
}
if (MyText[i] == 'Q')
{
EncryptText = "40735018298008298730725431001991";
}
if (MyText[i] == 'R')
{
EncryptText = "81629254782078072283690311362428";
}
if (MyText[i] == 'S')
{
EncryptText = "11484931118782297739315078625300";
}
if (MyText[i] == 'T')
{
EncryptText = "80642658828236815024324663471131";
}
if (MyText[i] == 'V')
{
EncryptText = "98185113022618718347727108401890";
}
if (MyText[i] == 'W')
{
EncryptText = "64055954743088822242668717475581";
}
if (MyText[i] == 'X')
{
EncryptText = "34011518510939004400504471925399";
}
if (MyText[i] == 'Y')
{
EncryptText = "34044922747088848241238723934011";
}
if (MyText[i] == 'Z')
{
EncryptText = "34084952747088846202261871934781";
}
for (int n = 0; n < 32; n++)
{
//Adding.
MyIntArray[n] = MyIntArray[n] + Convert.ToInt32(EncryptText[n]);
//Checking if the value is more than 10.
while (MyIntArray[n] > 9)
{
MyIntArray[n] = MyIntArray[n] - 10;
}
}
}
//Adding everything.
for (int i = 0; i < 32; i++)
{
FinalIntegers = FinalIntegers + Convert.ToString(MyIntArray[i]);
}
//TODO - Add your own sequence here. - TODO//
}
//Returning encrypted text.
public static string ReturnString()
{
return FinalIntegers;
}
}
}
Re: [C#]qCrypt - Open Source Encryption
It seems really cool to me. Never knew how to make such thing.
But as I understand from code it will work only for letters.
And when you try to decrypt text it will be all upper case.
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
ProKiller002
It seems really cool to me. Never knew how to make such thing.
But as I understand from code it will work only for letters.
And when you try to decrypt text it will be all upper case.
Well you can improve it so it will work with numbers and stuff. But actually it does work with numbers or any characters as long as it is not first char. It will just simply use the numbers from last letter which exists in the context. Actually I made them uppercase just for checking, it does not matter upper or lower. This program is not case-sensitive so does not matter at all.
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
Intelext
Well you can improve it so it will work with numbers and stuff. But actually it does work with numbers or any characters as long as it is not first char. It will just simply use the numbers from last letter which exists in the context. Actually I made them uppercase just for checking, it does not matter upper or lower. This program is not case-sensitive so does not matter at all.
Ohh I see. Then I must learn more to understand it better
Re: [C#]qCrypt - Open Source Encryption
Encryption is useless without being able to decrypt it.
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
Ron
Encryption is useless without being able to decrypt it.
Now this is just wrong.
It's not useless, it is used in passwords. When user enters it's password and encrypted password is compared with db password. Like MD5. It's also decryptable as far as I know. You can only guess the password using bruteforce or directory lookup.
Re: [C#]qCrypt - Open Source Encryption
Why did you change it to upper?
You can just do
Code:
if(MyText[i] == 'A' || MyText[i] == 'a')
etc.
This is more like a hash than an encryption. O_O
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
SimpleBB
Why did you change it to upper?
You can just do
Code:
if(MyText[i] == 'A' || MyText[i] == 'a')
etc.
This is more like a hash than an encryption. O_O
It's because I want to change every letter in the text. Not just A, or B.
Re: [C#]qCrypt - Open Source Encryption
Btw numbers for each letter are completely random right?
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
ProKiller002
Btw numbers for each letter are completely random right?
Yes, no algorithm was made during number creation.
You can create random numbers for each letter at program start, but then encrypted text will be useless if you restart the application.
Re: [C#]qCrypt - Open Source Encryption
I thought about generating random numbers each time but add like 4 characters specifying how numbers were generated or something like that.
Will that work? And will it be useful?
Re: [C#]qCrypt - Open Source Encryption
Well you need to figure it out by yourself. If you will generate numbers and add 4 to the end.. Well you will need to read only those last 4 if you want encryption to be the same every time. Otherwise it's cool to generate everything randomly each start.
Try it, then make it better, then try again and make it even more better.
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
Intelext
Now this is just wrong.
It's not useless, it is used in passwords. When user enters it's password and encrypted password is compared with db password. Like MD5. It's also decryptable as far as I know. You can only guess the password using bruteforce or directory lookup.
This isn't encryption. It's not 100% reversible but it is incredibly weak, so it's also not suitable for a hash.
Why don't you get a book on encryption algorithms and read up a bit on some math before you try and make your own encryption algorithm?
Re: [C#]qCrypt - Open Source Encryption
Quote:
Originally Posted by
jMerliN
Why don't you get a book on encryption algorithms and read up a bit on some math before you try and make your own encryption algorithm?
I have no point in making one. This was just for fun. :love:
Re: [C#]qCrypt - Open Source Encryption
This isn't actually encryption at all. You're just giving a random number for a letter. Example for a BASIC encryption:
PHP Code:
public void Encrpyt (ref byte[] bArray, Int32 nIndex, Int32 nSize)
{
if (nSize < 0) return;
for (int i = nIndex; i < nSize; ++i)
bArray[i] = ~((bArray[i] << 3) | (bArray[i] >> 5)&0xff);
}
Like I said, that's veryyyyyyyy basic.