Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Library for Encrypting Voice?

 
abu alfouz
Ranch Hand
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

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

Thank you.
 
Nicholas Jordan
Ranch Hand
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That would be as Henry advised in intermediate. Google for Java Crypto, let us know when you get stuck.
 
Pat Farrell
Rancher
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4678
7
Linux Mac OS X VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 44
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic