 |
|
 |
help me please..anyone have source code "encryption sms rc6 in java (j2me)"
please send to me dexendra_sinting666@yahoo.co.id
thanksss!!!!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I've compiled the code in VS 2005. but if i try to encrypt a file whose length does not devide by 16 (DWORD) i canot decrypt it back. this bug was mentioned in an previous post:
Load a short file with text which has a length not divisible by 16; debug using [View menu][debug windows][Memory] window to watch the buffer pdwTemp[0] in the CHexDoc::EncodeFile() function: Set the window once you've stepped over this line: pdwTemp = (DWORD*)&m_pFileData[i]; Then Step Out Of the function and watch as the code writes onto the FDFDFDFD marking the end of the buffer which belong to the system...
This is a consequence of the 4-DWORD-at-a-time access: for(UINT i = 0; i < m_nDocLength; i += 16) so you must make sure that the data you're encrypting is in a buffer with an extra 16 Bytes of 'space' after it to avoid overwriting memory. Just how you implement this will depend on the application: memcpy or CString::GetBufferSetLength(...) may be useful. regards
Has anyone solved this ? Thank you!
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I have encountered a heap block error pointing to dbgheap.c _CrtIsMemoryBlock function.
I noticed that this only happened if the file is around 240KB or more. Is this one of the limit of the application?
If not, can somebody please help me fix this error.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hello to all, I dowbload the source code of this project and opened im Visual Studio 2005, then i converted this project. (Visual Studio asked me) And when i start compiling i see one error:
In function CHexView::FormatLine hexenc_src\hexencview.cpp(182) : error C2679: binary '+=' : no operator found which takes a right-hand operand of type 'BYTE [17]' (or there is no acceptable conversion)
Tell me please, what need to do?
Sorry for my English
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Im doing my FYP for the final year..My supervisor had asked me to include the encryption for the password that contained inside a text file..... I had downloaded this source code and run it..but it shows me two errors..i don't know what's wrong with the code..... below was the error that was pointed to....

typedef UINT_PTR KSPIN_LOCK;
ofuka
|
| Sign In·View Thread·PermaLink | 1.20/5 |
|
|
|
 |
|
 |
Is there any body that has a code in C++ for differential attack on reduced DES to 6 rounds? If you have, please send me a copy of it, if possible for you.
Thanks a lot in advance. Regards, Nasoor
salame man be to yare ghadimi
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Dear all, I am looking for good and complete tutorials about these cryptography algorithms: RC3, RC4, RC5, RC6. Would you please help me?
Mansureh (shahraki@rediffmail.com)
|
| Sign In·View Thread·PermaLink | 1.33/5 |
|
|
|
 |
|
 |
you may wanna check out the book "Applied Cryptography, Second Edition: Protocols, Algorthms, and Source Code in C" by Bruce Schneier. It has the exhausted descriptions of many cryptography algorithms. BTW, google is another good way to meet your needs.
IS THERE ANYBODY OUT THERE?
|
| Sign In·View Thread·PermaLink | 3.50/5 |
|
|
|
 |
|
 |
I wrote again this code to Visual C# but my program only Encode, DeEncode is true with length of file mod 16 =0; This is my code, please help me.
private void EncodeFile(string fileRead,string fileWrite) { FileStream sourceStream = new FileStream(fileRead, FileMode.Open, FileAccess.Read); FileStream destinationStream = new FileStream(fileWrite, FileMode.Create, FileAccess.Write); long TotalLen=sourceStream.Length; int Len; long rdLen=0; int count=0; byte[] bufferStream = new byte[4096] ; UInt32[] Data=new UInt32[4]; byte[] buffer=new byte[16]; while(rdLen"<"TotalLen) { Len=sourceStream.Read(bufferStream,0,4096); for(int i = 0; i < Len; i += 16) { Data[0]=BitConverter.ToUInt32(bufferStream,i+0); Data[1]=BitConverter.ToUInt32(bufferStream,i+4); Data[2]=BitConverter.ToUInt32(bufferStream,i+8); Data[3]=BitConverter.ToUInt32(bufferStream,i+12); Data[1]=(Data[1]+m_dwS[0]); Data[3]=(Data[3]+m_dwS[1]);
for(int j = 1; j <= R; j++) { UInt32 t = LeftRotate((Data[1] * (2 * Data[1] + 1)), OffsetAmount((UInt32)(Math.Log((double)W)/Math.Log(2.0)))); UInt32 u = LeftRotate((Data[3] * (2 * Data[3] + 1)), OffsetAmount((UInt32)(Math.Log((double)W)/Math.Log(2.0)))); Data[0] = (LeftRotate(Data[0] ^ t, OffsetAmount(u)) + m_dwS[2 * j]); Data[2] = (LeftRotate(Data[2] ^ u, OffsetAmount(t)) + m_dwS[2 * j + 1]); UInt32 temp = Data[0]; Data[0] = Data[1]; Data[1] = Data[2]; Data[2] = Data[3]; Data[3] = temp; } Data[0] = (Data[0] + m_dwS[2 * R + 2]); Data[2] = (Data[2] + m_dwS[2 * R + 3]); count=0; for(int index=0;index<16;index+=4) { buffer[index]=(byte)((Data[count]&0x000000FF)>>0); buffer[index+1]=(byte)((Data[count]&0x0000FF00)>>8); buffer[index+2]=(byte)((Data[count]&0x00FF0000)>>16); buffer[index+3]=(byte)((Data[count]&0xFF000000)>>24); count++; }
Array.Copy(buffer,0,bufferStream,i,buffer.Length); } destinationStream.Write(bufferStream,0,Len); rdLen=rdLen+Len; } }
private void DeEncodeFile(string fileRead,string fileWrite) { FileStream sourceStream = new FileStream(fileRead, FileMode.Open, FileAccess.Read); FileStream destinationStream = new FileStream(fileWrite, FileMode.Create, FileAccess.Write); long TotalLen=sourceStream.Length; int Len; long rdLen=0; int count=0; byte[] bufferStream = new byte[4096] ; byte[] buffer=new byte[16]; UInt32[] Data=new UInt32[4]; while(rdLen"<"TotalLen) { Len=sourceStream.Read(bufferStream,0,4096); for(int i = 0; i < Len; i += 16) { Data[0]=BitConverter.ToUInt32(bufferStream,i+0); Data[1]=BitConverter.ToUInt32(bufferStream,i+4); Data[2]=BitConverter.ToUInt32(bufferStream,i+8); Data[3]=BitConverter.ToUInt32(bufferStream,i+12); Data[0]=(Data[0]-m_dwS[2*R+2]); Data[2]=(Data[2]-m_dwS[2*R+3]);
for(int j = R; j >=1; j--) { UInt32 temp = Data[3]; Data[3]=Data[2]; Data[2]=Data[1]; Data[1]=Data[0]; Data[0]=temp; UInt32 t = LeftRotate((Data[1] * (2 * Data[1] + 1)), OffsetAmount((UInt32)(Math.Log((double)W)/Math.Log(2.0)))); UInt32 u = LeftRotate((Data[3] * (2 * Data[3] + 1)), OffsetAmount((UInt32)(Math.Log((double)W)/Math.Log(2.0)))); Data[0]=(RightRotate((Data[0]-m_dwS[2*j]),OffsetAmount(u)))^t; Data[2]=(RightRotate((Data[2]-m_dwS[2*j+1]),OffsetAmount(t)))^u; } Data[1]=(Data[1]-m_dwS[0]); Data[3]=(Data[3]-m_dwS[1]); count=0; for(int index=0;index<16;index+=4) { buffer[index]=(byte)((Data[count]&0x000000FF)>>0); buffer[index+1]=(byte)((Data[count]&0x0000FF00)>>8); buffer[index+2]=(byte)((Data[count]&0x00FF0000)>>16); buffer[index+3]=(byte)((Data[count]&0xFF000000)>>24); count++; } Array.Copy(buffer,0,bufferStream,i,buffer.Length); } destinationStream.Write(bufferStream,0,Len); rdLen=rdLen+Len; } }
private void KeyGen(UInt32 dwKey) { UInt32 P32=0xB7E15163; UInt32 Q32 = 0x9E3779B9; UInt32 i,A, B; UInt32 dwByteOne, dwByteTwo, dwByteThree, dwByteFour; dwByteOne = dwKey >> 24; dwByteTwo = dwKey >> 8; dwByteTwo = dwByteTwo & 0x0010; dwByteThree = dwKey << 8; dwByteThree = dwByteThree & 0x0100; dwByteFour = dwKey << 24;
dwKey = dwByteOne | dwByteTwo | dwByteThree | dwByteFour;
m_dwS[0] = P32; for(i = 1; i < 2 * R + 4; i++) m_dwS[i] = m_dwS[i - 1] + Q32;
A = B =i= 0; int v = 3 * max(1, 2 * R + 4);
for(int s = 1; s <= v; s++) { A = m_dwS[i] = LeftRotate(m_dwS[i] + A + B, OffsetAmount(3)); B = dwKey = LeftRotate(dwKey + A + B, OffsetAmount(A + B));
i =( (i + 1) %((UInt32)(2 * R + 4))); }
}
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
I tried to setup RC6 in C# but not easy. Pointer only use in Unsafe mode. The Opperators <<, >> only support int type. Please help me. Thank for read My Message. Sorry for my English because I'm come from VietNam. My email : lonelywind1982@yahoo.com
|
| Sign In·View Thread·PermaLink | 1.83/5 |
|
|
|
 |
|
 |
Hi!!!
I used this code in my program to encode audio files( *.mp3 files ). I could have successfully decrypt in windows 2000. But problem I am facing is if I am encrypt audio files in win2000 and then trying to decrypt it in Windows XP with the same decrypt functionality, it get crashed. so can you give me suggestion , How I will use this functionality over all the Windows OS. Your help will be highly appreciated.
|
| Sign In·View Thread·PermaLink | 1.38/5 |
|
|
|
 |
|
 |
 hi all,
i am trying to use as it is the rijndael algorithm..for encrypting and decrypting the xml file...using AES rijndael..32 bit key and block size and also the method is CBC..it adds a few characters at the end of the file which makes it an invalid XML file..while using BLANKs..I am getting the valid XML file..Now i have to do is a server side encryption of the XML files..from php script..so i am using mcrypt library to do the same..but when i use this class to decrypt the same file it says can't secrypt..while i am using the same key and all..there the function is MCRYPT_RIJNDAEL_256..CBC and ECB..but nothing is working..can anyone help me out there in doing the same..or if there is any encryption which works as same in php and vc++ so that i just have to use the function and can do the same..Please help me out..any pointers and ideas are highly appreciated.. Thanks a lot in advance.. Regards,
himanshu
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
 |
hey, i was just wondering if anyone knew the actual key length used in this program or is it variable?? also if anyone was able to answer the question below on the key gen could you please send it on to me?
Life is Tough!!!
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
hey, i was wondering how the key generation part of this code worked. when the user inputs a key, what exactly happens? i think the algorithm below is the one used for rc6 but i cant figure out how your code achieves the first part of this, thanks for all your help!
Input: User-supplied b byte key preloaded into the c - word array L[0,…,c-1] Number r of rounds Output: w-bit round keys S[0,…,2r + 3] Procedure: S[0]=Pw for i=1 to 2r+3 do S[i]=S[i-1]+Qw A=B=i=j=0 v=3 ? max{c, 2r+4}
for s=1 to v do { A=S[i]=(S[i]+A+B)<<E B=L[j]=(L[j]+A+B)<<<(A+B) i=(i+1) mod (2r+4) j=(j+1) mod c }
abritto
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
hey, i just wanted to know what exactly we are looking at when we open a file in this application. is it the hex equivalent of the file? also, what are the three columns showing for?
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
the middle part is the hex equivalent of the file as you said. the left part is the displacement address of the cooresponding data in the middle part. and the right part is the character representation of the file(however, I use '.' to replace some uncommon characters at the right. that's why you can see many '.' over there).
Come on! Decode me.
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
when i run this code in visual c++ 6.0 an error keeps coming up that it cannot open the Hexenc.pch file. i opened a new project and copied the code into it, is this the right thing to do? i chose to open a Win32 console application and chose a simple application. i deleted the stdafx files and copied in the ones given. i havent a clue if this was the right thing to do or not?? i'm pretty new to visual c++ and its a bit confusing for me! Thank for your help
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
when that happened to me before, I just deleted that .pch file and compiled it again. Then, everything is fine. you can try it. good luck!
Come on! Decode me.
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
this project looks good and works well, but i was wondering if it would be hard to change the code to use RC5 encryption and decryption. i'm not too good on the programming side of things and any comments or help would be appreciated.
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
I am sorry that I don't try much on RC5. But I believe it shouldn't be hard to change this code to RC5. The framework is the same. I think you just need to replace the core RC6 algorithm to RC5. That shouldn't be painful.
Come on! Decode me.
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
Load a short file with text which has a length not divisible by 16; debug using [View menu][debug windows][Memory] window to watch the buffer pdwTemp[0] in the CHexDoc::EncodeFile() function: Set the window once you've stepped over this line: pdwTemp = (DWORD*)&m_pFileData[i]; Then Step Out Of the function and watch as the code writes onto the FDFDFDFD marking the end of the buffer which belong to the system...
This is a consequence of the 4-DWORD-at-a-time access: for(UINT i = 0; i < m_nDocLength; i += 16) so you must make sure that the data you're encrypting is in a buffer with an extra 16 Bytes of 'space' after it to avoid overwriting memory. Just how you implement this will depend on the application: memcpy or CString::GetBufferSetLength(...) may be useful. regards BossShot
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
This bug is really exist. To test it -- open zip file, encrypt it, close HexEnc.exe, open it again, decrypt zip file, and try to extract! [Unexpected end of archive!]
Also in Debug version you can see ASSERT MessageBox in CHexDoc::DeleteContents() then you open next file after encryption.
UF!!!! But how to fix it fast? I dont want to use extra 16 Bytes of 'space'!
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Just looking at your article, but I see that hypersnap has defaced your screenshot. I just thought I'd mention (in case you don't know) that if you press the print screen key a screen capture is sent to the clipboard, and if you press Alt + Print Screen you'll get a picture of the active window taken! You can then manipulate it or whatever...
With time we live, with money we spend! Joel Holdsworth
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |