encryption

Client-Server Data Encryption and Protocol Design

Hello, I'm writing a client-server application to be used in a computer lab and act as a service (without running as a service). I have a console application calling the native function "ShowWindow"/SW_HIDE using the console's HWND object -- this gives it what I am wanting here. The server/client is working, I've sent the message "Hello...

hmac-sha1 in ruby differs from C# HMACSHA1

I am trying to test the API from ankoder.com and have problem on the digest calculation for the authentication token . The sample is ruby while I am trying to call from C#. When I compare the digest result between in HMAC-SHA1, I got issues with the passkey result. To make it easy to test here is the code: require 'hmac-sha1' require ...

Small RSA or DSA lib without dependencies

Is there a small library for RSA or DSA without any dependencies like GMP or OpenSSL? (Written in C or Asm) ...

How should I store a user's LDAP password in a cookie?

So I have this black box authentication method, handed down to me from the accounts people, which basically amounts to ldap_bind($connection, $username, $password). But of course, I want my users to be able to log in for, say, 30 days at a time. The naive but insecure way to handle this is to store the username and password in plaintext...

Sending secure data over the network in iPhone

Hi, I have a query regarding sending secure data over the network in iPhone. What should be used to secure credit-card, bank acct# etc. information which is sent over wireless network. Is there any difference in methods if we use a native-app or a web-app? Are there any direct APIs available for this? Any tutorial will be really he...

encrypt a password textbox in create view

hi thre i want to provide a textbox that would allow the user to encrypt a text i will basically use that in my create view for users and i have username and password textbox html helper how would i apply an encrypt functionality for the password textbox html helper? let say i have a button encrypt beside the password textbox... th...

How can I pass a User model into a form field (django)?

Basically, I need to use the User's password hash to encrypt some data via a custom model field. Check out the snippet I used here: Django Encryption. I tried this: class MyClass(models.Model): owner = models.ForeignKey(User) product_id = EncryptedCharField(max_length=255, user_field=owner) ......................................

Extend Contacts application on Android to provide encryption

Hi All, I want to encrypt individual contacts stored by the Contacts application on Android based on user's preference. So, I am thinking I'll have to hook/extend the Contacts application before the it stores data into the database and decrypt it when the user wants to view it. Also, I am assuming I will have to store the key for encryp...

Can I use JS encryption instead of SSL for credit card payments?

Hi, I have an HTML form where people can make payments on my sites. Instead of using SSL, I'm wondering whether I could use a JS lib that would encrypt the credit card information and send it to the server in clear text but encrypted, than the server would decrypt it. I found several libs that do that, they basically ask for a key pair ...

Is there any point encrypting passwords with more than md5?

I am not a security expert... so I might be very wrong here. Am I right in that the only advantage to using a stronger algorithm is to slow down password cracking? In which case they must have the password hash and so will have already comprimised my database right? As I do not store any thing of real world value what is the point in ...

How to implement copy protection of content in an open source application?

I have an idea for an open source app -- the app would be free, but I would charge a small fee for data that a customer would order. For instance, let's say I'm writing a map application. I'd give the app away, make it open-source, but I would like to sell various maps to individual users. Is there a way to protect the data in such a wa...

what is best possible way of salting and storing salt?

Hi guys I have read about password salting, but this might sound a little odd. But how do I store and secure the salt. For example in a multi tire architecture say I use the client machine’s GUID to generate my salt then the user gets restricted to a single machine but if I use random salt it has to be stored somewhere. Few days back I ...

Writing a C# desktop application that needs to embed an encrypted database. What type of database should I use?

Hey SO'ers, I'm making a C#/WPF app that needs to access a number of tables to generate some of the xaml code I will use in the app. The tables will also contain some floating point numerical data as well. The program is single-user, so the rdbms doesn't have to be very fancy, but the file does need to be encrypted as it will be "shrin...

How do i access Autogenerated validation and decryption keys in asp.net?

If I have the DecryptionKey and ValidationKey set to AutoGenerate in the machineKey section of the machine.config, how do i look up from .NET the actual generated keys which have been created? We wish to use the same keys to encrypt and validate our own cookies. Any clues/tips gratefully received. ...

md5 encrypt cookiedata with serialized array

Hello, I was attempting to encrypt de cookie data with md5, but I can not validate the hash back. It has got to do, with the fact that cookie_data is a serialized array, because normal stringvalues work ok. It's actually from a codeigniter class, but it does not work?? Does anyone know what the problem might be? $hash = substr($s...

Request.Querystring removes characters from encrypted text

In my application I take a user's e-mail address, encrypt it, and URLEncode it, and pass it along into a QueryString. email = Server.UrlEncode(aes.Encrypt(email)); The landing page does a Request.Querystring["email"], UrlDecodes it, and then decrypts it. string email = Server.UrlDecode(Request.QueryString["eId"]); ...

sending encrypted email

Hi, I am currently sending an email from my xcode/iphone app. The requirements are to send an encrypted email or attached file and then be able to decrypt/open the information after receipient delivery. Has anyone seen any code to help me accomplish this task? Thanks Leland ...

invalid AES key length error

this code give invalid AES key length error. how can i correct it ? ( i want 128 bit key AES encryption ) package org.temp2.cod1; import java.security.*; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; public class Code1 { public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingEx...

why should aes key be generated randomly ?

when you want to encrypt something dont you want the key to decrypt to be decided by you and not generator by some random number generator ? i see this code in stackoverflow post. but i dont want the key to be generated randomly i want to the user to be asked to enter the key and on that bases the encryption should happen.. any suggest...

AES encryption - password , salt not resolved ?

i get the error " password , salt not resolved ". any suggestions ? package org.temp2.cod1; import java.security.*; import java.security.spec.KeySpec; import javax.crypto.*; import javax.crypto.spec.*; import java.io.*; public class Code2 { public static void main(String[] args) throws NoSuchAlgorithmException, NoSuchPaddingException...