Hi Friends,
I wanna create very simple encryption/decryption of audio with Arduino Nano. This module will connect to the mobile phone jack + earphone jack. I searched but could not find any programmable Arduino module for that. Is there anyone try something like that?
Regards,
The Arduino doesn't have enough processing power for real-time audio and there's no DAC (so no true-analog output).
analogWrite is [u]PWM[/u] which will make an LED appear to dim, or it can control the speed of a motor. Tthere are a couple of libraries that can get audio with very-fast PWM, but there can be issues with that and chews-up most of the processing power so you can't do much more than play audio from an SDcard.
Thank you, I don't have components right now but I will try to make shift left or right binary data... First I want to make in and out the same freq. Did you try it before following circuit? 1sec delay will be acceptable... 
but I will try to make shift left or right binary data..
All that will do is to change the volume of the audio.
I want to make in and out the same freq
Just output the samples at the same rate as you input them to do that.
1sec delay will be acceptable
A one second delay will be a miracle, there is not enough memory for that. Depending on the sample rate you only have enough memory for about a tenth of a second of delay on a nano, and that is if you want a delay.
There is a project in my book Arduino Music and Audio Projects | SpringerLink that uses external chips along with an Arduino / nano to allow you to write code for various effects. That can give you a delay of about 40 seconds if you want. It also has various effects like multiple echo, pitch shift up or down in real time and real time backwards speaking.
And your point is?
Apart from trying to get my machine filled with a virus?
If you or he is saying that shifting a sample up or down does anything but alter the volume then you or he are fundamentally miss understanding something.
Virus? This is a voice encryption for gsm using arduino. (I have similar product with Android but for text/image messaging, like whatsapp, messenger or sms data etc.)
If you or he is saying that shifting a sample up or down does anything but alter the volume then you or he are fundamentally miss understanding something.
The bit shifting is simply for converting the 10-bit ADC data to 8-bits.
I didn't dig-in too deeply but I didn't see any details about the actual encryption. And from what I read, it looks like they never got it working. It looks like they never got it working without encryption...
"Normal" digital encryption won't work with analog because the A/D and D/A conversion can't be done "perfectly". You'd get similar "complications" related to the lossy compression algorithms used in cell phone audio. For example, you can encrypt an MP3 file (lossy compression) but if you encrypt a WAV file and then make an MP3 you'd never be able to decrypt it.
I'm not saying it can't be done but you'd have to use "analog compatible" techniques for scrambling & unscrambling the voice.
while(inCommingAudio) {
r = inCommingAudio %10;
reverse = reverse * 10 +r;
inCommingAudio = inCommingAudio /10;
}
So, its very fast...
How are you going to synchronize the Transmitter and the Receiver so that if for example you you encrypt ''AB'' to ''4D'' and the receiver gets ''4D'' will successfully decrypt ''AB''. How will you achieve nanosecond accuracy, so that there is no delay due to encrypting/decrypting?
Start Signal (DTMF) - audio - Finish signal (DTMF)
You don't have to synchronize...
The wireless channel behaves like a filter. The "AB" that the tranceiver sends and transformed to electrical signal and then received by the receiver if not synchronized and received with shifting the end result may be "FG" and when the DAC transform it to acoustical signal to hear you will hear something different.
Also cryptography is not as simple as you describe on #9....If you cannot hide the frequencies of each letter you dont do something..
Sure Cryptology (as a cryptologist I know) is not easy. This will be my test project for Arduino. I just give example in #9, I have my own crypto but I can't implement to the Arduino because in assembler and just for the Android (it's a system apk. Works with Voice, Sms, WhatsApp, Messenger, BiP etc. without using API). This will be just for fun 