encryption

Encryption and Java, method generating key - what size?

I got the following method body to generate a key for encryption: new BigInteger(500, new SecureRandom()).toString(64); Could anyone explain what is the size of generated key? ...

python X.509 asymmetric encryption

Hello I'm trying to understand how certificate and asymmetric encryption works. I'm looking for a python library where i can import public or private ca signed certificates and automatically encrypt or decrypt message in string format, i viewed the crypto library embedded in python source, but i don't know how to use the hex modulus and ...

Understanding NSS PK11_CipherOp and C memory allocation

Hey all, Having some issues with C. I have this is my code: // First line works, second line does not! char outbuf[1024]; // char *outbuf = (char *) malloc(1024); // char is always 1 I am passing this outbuf to a method called PK11_CipherOp(), declared in the NSS library. The Documentation for this method can be found here, you ca...

simple encryption tutorial?

I'm looking for a simple encryption tutorial, for encoding a string into another string. I'm looking for it in general mathematical terms or psuedocode; we're doing it in a scripting language that doesn't have access to libraries. We have a Micros POS ( point of sale ) system and we want to write a script that puts an encoded string on...

Running a website from an encrypted partition

I am looking at the possibility of running a PHP-based website (built in symfony) from an encrypted partition on a LAMP server. The reason for this is because a client would have access to the server but I don't want them to see the source code behind the php website. I am open to other solutions if this is not possible. For example, p...

Is there a way to check with calls into my web-application API came from my distributed client???

Hi, Is there a way to check with calls into my web-application API came from my distributed client??? That is if I have both a thick client (windows forms client say) and the server side web application that exposes a HTTPS interface (assume user puts username/passwork into the client configuration for authentication), is there a way t...

in php how to find already encrypted file in specific folder.

Hi, I am using PGP (GNU Privacy Guard) for encrypting the file. while encrypting i removed the '.pgp' extension of encrypted file. Now some how i want to know which file is already encrypted in the specific folder. Note :- my goal is that ... do not encrypt any file twice ... so before encrypt any file .. i want to check is the file ...

48-bit blowfish

Is there an implementation (Java/C++/Ruby) of a blowfish algorithm that supports 48-bit data blocks? I have an encryption problem where the input and output channels are exactly 48-bits. All implementations on the net are for 64-bit blocks. Thanks, Tom ...

will encrypting a comma seperated list of ID's make it smaller to fit into a cookie?

say I want to store ID's in a cookie: 123,1232,3443,2343,2344422,2342 seeing that a cookie has a 4kb limit (or whatever), would encrypting the value allow for more storage somehow? if so, which encryption would be best? (not really worried about security, just want to store more with less footprint) ...

Translating algorithm/code from Ruby to PHP

digest = HMAC.digest(Digest.new(SHA1), Base64.decode64(key), HashString) return Base64.encode64(digest.to_s()).chomp() What would the above be in PHP? ...

Signing messages with PyMe (GnuPG Python Wrapper)

Hi, I use PyMe to sign and verify messages. I have a problem setting a pass-phrase callback that will return a password for the private signature key whenever needed for signing. My code looks like this: def passphrase_callback(hint='', desc='', prev_bad=''): return 'password' class CryptoEngine: def init(self, user_id, passph...

Has anyone got a tutorial up on getting your own smartcard and getting pkcs#11 working on it?

Has anyone got a tutorial up on getting your own smartcard and getting pkcs#11 working on it? In Linux? (Windows would be fine too). Most of the vendors seem to assume you'll be wanting enough for your whole company, not one or two. ...

What is the best way to keep database data encrypted with user passwords?

Let's say an application has really specific data which belongs to a user, and nobody is supposed to see it except the owner. I use MySQL database with DataMapper ORM mapper. The application is written in Ruby on Sinatra. Application behavior: User signs up for an account. Creates username and password. Logs into his dashboard. Some ...

encrypting flash files

what's the recommended method to encrypt flash files ? i'd like to make some flash programs that are commericals, how can i made sure that they won't get decrypted or to make sure that i used to strongest file encryption possible. ...

flash: how to encrypt information that is sent from swf to web server

hi. i want to make flash programs that send information to the web server that cannot be revealed by the user. of course the user will be able to see that HTTP request that is being sent, but i want to encrypt the data before transferring it. what's the best method to achieve that ? ...

encrypting data using blowfish under flash.

how can i encrypt data in flash? is there a toolkit or class or something that can help me do that ? ...

What is the safest algorithm in Kohana's auth module?

I'd prefer to use the crypt function and use blowfish encryption, but the current implementation of this module uses the hash function, which doesn't offer this encryption method. So, what is the safest algorithm in Kohana's auth module? Would SHA-512 be a good option or am I better off modifying the module to use crypt and blowfish? ...

What encryption scheme meets requirement of decimal plaintext & ciphertext and preserves length?

Hi, I need an encryption scheme where the plaintext and ciphertext are composed entirely of decimal digits. In addition, the plaintext and ciphertext must be the same length. Also the underlying encryption algorithm should be an industry-standard. I don't mind if its symmetric (e.g AES) or asymmetric (e.g RSA) - but it must be a recog...

How to protect intellectual property in java app

What product / technology can I you use to protect my java code in a commercial application? Is there a obfuscator that does the job? On the other side, it would be great to have anything that combines file-based license management with byte-code encryption. Any Ideas? Best practices? ...

Can anyone get access to my PHP source code ?

Is it possible to hide the .php file on the server...? I have a website which sometimes calls php files inside iframes, now I wouldn't like it if somebody copied that code, so how would I hide it? Or do I have to encrypt it? Speed is a huge matter in my case, so anything that doesn't affect performance is appreciated! Thanks ...