encryption

what libraries do i need to run this keygenerator class

which libraries do i need to import for this class KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(128); if you dont want to spoon feed me atleast tell me how can i find out about the libraries myself. i use eclipse ...

what is this error on open declaration ?

KeyGenerator kgen = KeyGenerator.getInstance("AES"); kgen.init(128); // 192 and 256 bits may not be available in eclipse when i select KeyGenerator and right click open declaration i get this window opened click here to see error image can you explain whats wrong here ? btw here is the complete code package org.temp2.cod1; ...

help understanding this comment .

I'm trying to understand this comment from AES implementation code: /** * This program generates a AES key, retrieves its raw bytes, and * then reinstantiates a AES key from the key bytes. * The reinstantiated key is used to initialize a AES cipher for * encryption and decryption. */ I dont understand following points: what doe...

storing credit card info

So I would like to modify a PHP / MySQL application in order to store credit card but not cvv and bank account info securely. PCI DSS require 1024 RSA/DSA. A small number of users will be given private key in order to decrypt the batch file of account info for submission to payment processors monthly. I'm unclear if it is possible to hav...

Persisting web service passwords

I'm not a security guy so any help on this would be greatly appreciated. I have a large number of third-party field devices that have remote methods that can be called across xml-rpc using ssl. For each method call, a username and password must be transmitted in plain text as parameters along with any other method parameters. I have no ...

Protecting RSACryptoServiceProvider private key with password or otherwise

I want to encrypt some server data using .NET's RSACryptoServiceProvider and decrypt it when someone enters a key/password via a web page. What are my options for protecting, or ideally not even storing, the private key on the server, whilst avoiding having the user supply it all each time? Encrypt the private key using a symmetric sys...

how can the decryption happen at a later stage with this AES program

i am really not able to figure this out myself so please help me out. this is a program to encrypt contents of an existing file keeper.txt using 128bit AES putting the encrypted text into newly created file called Encrypted.txt, then decrypting the contents of Encrypted.txt into newly created file called Decrypted.txt everytime this pro...

please advice whether about our case of using encryption

Our client wants to give us a database. The original database has a phone number column. He doesn't want to give us a phone number. Somehow i'm not sure why - it is decided that client will give us encrypted phone numbers with encrypted with 128bit AES key. We will tell the client which phone number is to be shortlisted for some purpos...

What are those "garbage" 16 bytes at the beginning of an unencrypted EncryptedData tag from an encrypted ws-security SOAP message? (WCF)

I'm inspecting a WCF request message in order to implement part of the WS-Security standard to have iPhone <-> WCF intercommunication (I'm using certificate security over basicHttpBinding). After reading the standard xmlenc-core I could decrypt both the SignedInfo and the Body tags, but I see 16 bytes at the beginning of both unencrypted...

How does the RSA private key passphrase work under the hood?

RSA private keys may be assigned a "passphrase" which - as I understand it - is intended to provide some secondary security in case someone makes off with the private key file. How is the passphrase layer of security implemented? ...

How to do asymmetric encryption with X509 certificates and C#?

I am looking to encrypt files with X509 certificates using public and private keys and send them to a remote server. How would I do this? Is this even possible? How do I generate the certificate and then the public and private key pairs? ...

How would you store encrypted information in public DVCS repository?

Hello Everyone, I have projects that multiple developers are working on. We all work off the same git repository. Currently, I do not store production server configuration in the repository, because the configuration files contain database credentials. I would like to start storing these configurations in the repository, so I'm thinki...

How should I generate an initialization vector?

I'm sure there's not one answer to this question, but just trying to find out a general approach. Using Java 1.4.2, I need to generate a key and IV for use in a symmetric algorithm. These values will be pre-shared with the recipient through a secure channel. The key I can generate with KeyGenerator.keyGenerate(). But unless I'm missi...

how to encrypt string in php

I want to make one function like It should have some secret key to mix with so that one one can break it function encrypt($string) { $key ="mastermind" return encryptfunc($string,$key) } and same thing for decryption ...

Is it possible to use AES with an IV in ECB mode?

From http://php.net/manual/en/function.mcrypt-encrypt.php, I saw the following codes using AES with an IV in ECB mode, <?php $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); $key = "This is a very secret key"; $text = "Meet me at 11 o'clock behind the mon...

Has anyone know how to consume WCF Certificate based security WebServices from an iPhone app?

I'm trying to interact with a WCF web services using certificate based security and both message signature and encryption but with no luck. I had successfully implemented signature only communications, but when I create the elements I get an error verifying the message. Has anyone have any hints on how to implement this? Thanks!!! ...

to start coding in C# for eToken

Newbie request for advise. I have a task to develoop C# (VB.NET) service class (library) for storing/extractin user's passwords in/from Aladdin eToken devices. Advise me any: walkthroughs, tutorials forums, discussions code sample(s), examples I googled but couldn't find anything helpful for starting coding. "eToken PKI Develop...

AES 256 in CTR mode

ctr mode makes it possible to use a block cipher as a stream cipher but how strong will be the encryption in this mode ? ...

java - why do i keep getting -1 as the value of in.read(buf) ?

(To the Moderators ) please note that i had posted a related problem before but this is a more complete post so please dont close it as duplicate . you may close the previous post. whenever i get -1 in the console output no data is written in outputstream, whenever i get 3 in console output valid data is writtien in outputstream. the oc...

How to encrypt all existing stored procedures of a database

Is there any possibility to encrypt all existing stored procedures of a SQL Server 2008 database AFTER they have been created via an SQLCMD script? The reason I want to do this is the following: I'd like to develop the stored procedures without encryption so I can easily click on "Modify" in SQL Server Management Studio to check their c...