File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Security and the fly likes Library for Encrypting Voice? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » Security
Bookmark "Library for Encrypting Voice?" Watch "Library for Encrypting Voice?" New topic
Author

Library for Encrypting Voice?

abu alfouz
Ranch Hand

Joined: Nov 20, 2006
Posts: 44
Hi

Does anybody know about simple library that I can use it for encrypting and decrypting voice files?

Thank you.


SCJP 1.5
SCWCD 1.4
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
That would be as Henry advised in intermediate. Google for Java Crypto, let us know when you get stuck.


"The differential equations that describe dynamic interactions of power generators are similar to that of the gravitational interplay among celestial bodies, which is chaotic in nature."
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

voice is just data. First you have to record the sound, get the data, get the bytes, apply your favorite cipher, and convert the enciphered bytes to some format to store.

To play back, reverse.

The java crypto code is simple, for a crypto library. None of this stuff is very simple or approachable.

Key management is the hard part, but first you should get the basics down
Nicholas Jordan
Ranch Hand

Joined: Sep 17, 2006
Posts: 1282
Pat, it's a student project:

http://www.coderanch.com/t/385406/java/java/Voice-encryption-decryption-java

Poster, Pat knows what he's doing.

It all gets down to key control. You can look at the full range of emoticons provided for posting as well as add a few others to get some idea of what key control is about.

Unfortunately, to get there takes some intense study ... Start with

http://java.sun.com/j2se/1.4.2/docs/guide/security/CryptoSpec.html

The Java Cryptography Extension (JCE) extends the JCA API to include APIs ... The Java Cryptography Architecture (JCA) was designed around these principles: ...
[ May 11, 2008: Message edited by: Nicholas Jordan ]
Pat Farrell
Rancher

Joined: Aug 11, 2007
Posts: 4646
    
    5

As a student project, the rules are a lot easier to deal with.

First, make sure you can record voice and store the data, at least to a disk file. And can play it back.

Get that working first.

Then you can 'encipher' it by XOR with a trivial passphrase. Store that, and play it back.

Then, and only then, add the real crypto layer as Henry and others have pointed.

The key to remember is that a crypto API takes stuff and makes it look like random garbage. It does this when it works right, and when it works wrong.
If you don't have everything else working, you will never be able to tell what is the cause of your bugs.

Its fairly easy to get things a little bit wrong, and if you are lucky, you won't be able to decihper it. If you are unlucky, you will deploy it, and later someone else will find that its trivial to break.

For a student project, you don't have to worry too much about that.
abu alfouz
Ranch Hand

Joined: Nov 20, 2006
Posts: 44
Thank you.
 
 
subject: Library for Encrypting Voice?
 
Similar Threads
PGP encryption in java?
JavaMail password store
audio
Encryption/decryption using core java and then insert into database
encrypt data in database