encryption

Creating a Cerificate for Bouncy Castle Encryption

I am trying to create a self-signed certificate to use for encrypting an email using bouncycaste. What would be the best way to generate a certificate? I have tried using openssl but I have had problems with certificate. Here is the code I am using to encrypt, I am using 3des. SMIMEEnvelopedGenerator gen = new SMIMEEnvelopedGenerator...

Did I find a bug in PHP's `crypt()`?

I think I may have found a bug in PHP's crypt() function under Windows. However: I recognize that it's probably my fault. PHP is used by millions and worked on by thousands; my code is used by tens and worked on by me. (This argument is best explained on Coding Horror.) So I'm asking for help: show me my fault. I've been trying to fin...

Basic security, PHP mySQl

So I am making a basic log-in page. I have a good idea of what to do, but I'm still unsure of some things. I have a database full of students and a password column of course. I know I'm going to use md5 encryption in that column. The student enters their e-mail and student ID, and they get e-mailed a password if correct. But, where do...

Problem with RSA-encrypting a string in PHP and passing it to .NET service

I need to call a web service that requires a login url containing an RSA encrypted, base_64 encoded and url-encoded login data. I don't have a formal php training, but even for me it seems like an easy task, however when calling the service I get an 'Invalid Format' response. What am I doing wrong and is there another way to come up with...

How do I encapsulate some text information in an image and extract it using MATLAB?

new_img = convert(img, text); (img, text) = convert_back(new_img); Can someone illustrate with a built-in image of MATALB? ...

Why does the web page I fetch with Perl look odd?

I have a Perl script to open this page http://svejo.net/popular/all/new/ and filter the names of the posts but except headers everything seems encrypted. Nothing can be read. When I open the same page in a browser everything looks fine including the source code. How is it possible to encrypt a page for a script and not for a browser? My ...

Encryption-Decryption in Rails

Hi All, I am using require 'digest/sha1' to encrypt my password and save into database. During login I authenticate by matching the encrypted password saved in database and again encrypted the one use enter in password field. As of now everything works fine but now I want to do 'Forgot Password' functionality. To do this I need to decry...

How can I convert a zfo to a standard xml file?

I have this file format from 602 form filler. Unfortunately 602 sotfware no longer offer an SDK to their product. I've uploaded the file here : http://cid-d53719d869fb8243.skydrive.live.com/self.aspx/Public/31602.zfo I can't figure out how convert the file from zfo to .fo. Honestly I don't even know if the file is zipped or encoded, s...

Pass certificate to j2me

I created a certificate on apache server. x.509 public key certificate RSA created using the keytool I need to pass this to a J2me app, via http. So the J2me app can encrypt data How do I do this. ...

BitShifting with BigIntegers in Java

I am implementing DES Encryption in Java with use of BigIntegers. I am left shifting binary keys with Java BigIntegers by doing the BigInteger.leftShift(int n) method. Key of N (Kn) is dependent on the result of the shift of Kn-1. The problem I am getting is that I am printing out the results after each key is generated and the shiftin...

using php to create a joomla user password?

Hi all, I'm trying to create a custom registration component for Joomla, and I was wondering if anyone knew how to create the correct password encryption for joomla? Joomla passwords look like this : fbae378704687625a410223a61c66eb1:VM6DwmVWHTwpquDq51ZXjWWADCIc93MR Which I believe are md5 (or something) and one way encryption? Am just...

How to implement the Tea Algorithm with objective c ?

hi,all i am a new object-c developer,i wanna implement Tea Algorithm, but i don't know more about the byte infomation ,so i cant control the string byte stream .who can tall me how to implement this Algorithm. thanks. ...

Iterative / Additive MD5

I need to generate a checksum over a dictionary. Keys and Values. Is there any simple way to accomplish this in an iterative way. foreach(var item in dic.Keys) checksum += checksum(dic[item]) + checksum(item); In this case, keys and values could be converted to strings, concatinated and then a single checksum applied over these but i...

How to encrypt/decrypt multiple strings in AES encryption??

hello again everyone, i would like to know if i could encrypt two or more strings in AES encryption. let say, i want to encrypt username, password and nonce_value, can i use the following code? try{ String codeWord = username, password, nonceInString; String encryptedData = aseEncryptDecrypt.encrypt(codeWord); String decryptedData =...

how to display the decrypted and splited Strings in order?

Hi everyone, i need some help and guidance in displaying the splitted Strings in order. let say, i have username, password, nonceInString. i had successfully encrypted and decrypted those. then i split the decrypted data. it was done, too. i want to display the decrypted data in order. something like this. userneme: sebastian...

Can per-user randomized salts be replaced with iterative hashing?

In the process of building what I'd like to hope is a properly-architected authentication mechanism, I've come across a lot of materials that specify that: user passwords must be salted the salt used should be sufficiently random and generated per-user ...therefore, the salt must be stored with the user record in order to support verif...

how could I store data within a GUID

I have an application that I want to represent a users session (just small pieces of data here and there) within a GUID. Its a 16 HEX characters (so 16^16 possible values) string and I want to 'encode' some data within that GUID. How can I achieve this? I am really after any ideas and implementations here, Ive not yet decided on the bes...

implemented a program that generate non transferable licence

Hello, I'm taking a security class and required to implement a licensing server that send licenses that are non -transferable. I have no idea how to do that, could you please give me some of your ideas. Regards, ...

RSA encryption results in server execution timeout

Hi, I am using PHP Crypt_RSA (http://pear.php.net/package/Crypt_RSA) for encrypting and decrypting the contents. Contents are of 1kb size. Following are the results: keylength = 1024 Encryption function takes time: 225 secs keylength = 2048 Encryption function takes time: 115 secs I need to reduce this execution time as most...

ASP MVC: E-mail Verification (Encrypting the activation link)

Okay i'm a little bit stuck on how to solve this problem. When a user registers. I want to send him a link so that he can verify hes email address. But i have troubles generating the link. I've already written the controller to accept the links with the correct keys. i only have no idea on how to generate the activation keys. So wh...