# Digital voice encryption block

**URL:** <https://www.ruby-forum.com/t/digital-voice-encryption-block/240504>\
**Category:** GNU Radio\
**Created:** [April 17, 2014, 3:51pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504 "2014-04-17T15:51:45Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [April 17, 2014, 3:51pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/1 "2014-04-17T15:51:45Z")

</div>

Hi all,

I want to simulate a voice transmission system in GNURadio Companion  
(GRC) before I build a real one. My system configuration is as follows.

TX:  
mic → encoder → encryption → modulator → RF

Rx:  
speaker ← decoder ← decryption ← demodulator ← RF

I have succeed in simulating the above configuration in Ubuntu 12.04 LTS  
machinebut without encryption/decryption blocks.

I want to encrypt my digital voice using AES (128/192/256, either one)  
algorithm, but so far, I couldn’t find suitable blocks for my purpose.

I know that GNURadio will synthesize a python code when you compile your  
blocks configuration in GRC. On the other hand, every python dev  
installation in Ubuntu will also install PyCrypto lib in your machine,  
this library has a ready-to-use function of AES algorithm. Furthermore,  
I also know the concept of Out-of-Tree Module (OoTM) of GNURadio.

My questions are:

1. My first thought is to get data stream of certain block and do  
encryption process with PyCrypto (not in the OoTM, but directly in  
synthesized python code) then put them back to the next block. Would it  
be possible and how to achieve this?

2. Do GNURadio has a ready-to-use GRC blocks or OoTM of digital  
encryption algorithm (not scrambler)? and how do I get it (a tutorial  
would be fine)?  
So far, I can not found the block either in GRC or [https://www.cgran.org](https://www.cgran.org)

3. Last question may be off topic a bit. Is it common to use AES  
algorithm to encrypt voice data, or is there any common encryption  
method (preferably could be implemented in GRC)?

Thank you for your time and willingness to answer these questions

Regards  
tc

---

<div class="post-metadata">

**Author:** ![Tigor\_Christian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecd19e/32.png) [@Tigor\_Christian](https://www.ruby-forum.com/u/Tigor_Christian)\
**Post date:** [April 17, 2014, 4:04pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/2 "2014-04-17T16:04:09Z")

</div>

Hi all,

I want to simulate a voice transmission system in GNURadio Companion  
(GRC) before I build a real one. My system configuration is as follows.

TX:  
mic → encoder → encryption → modulator → RF

Rx:  
speaker ← decoder ← decryption ← demodulator ← RF

I have succeed in simulating the above configuration in Ubuntu 12.04 LTS  
machine but without encryption/decryption blocks.

I want to encrypt my digital voice using AES (128/192/256, either one)  
algorithm, but so far, I couldn’t find suitable blocks for my purpose.

I know that GNURadio will synthesize a python code when you compile your  
blocks configuration in GRC. On the other hand, every python dev  
installation in Ubuntu will also install PyCrypto lib in your machine,  
this library has a ready-to-use function of AES algorithm. Furthermore,  
I also know the concept of Out-of-Tree Module (OoTM) of GNURadio.

My questions are:

1. My first thought is to get data stream of certain block and do  
encryption process with PyCrypto (not in the OoTM, but directly in  
synthesized python code)  
then put them back to the next block. Would it be possible and how to  
achieve this?

2. Do GNURadio has a ready-to-use GRC blocks or OoTM of digital  
encryption algorithm (not scrambler)? and how do I get it (a tutorial  
would be fine)?  
So far, I can not found the block either in GRC or [https://www.cgran.org](https://www.cgran.org)

3. Last question may be off topic a bit. Is it common to use AES  
algorithm to encrypt voice data, or is there any common encryption  
method (preferably could be implemented in GRC)?

Thank you for your time and willingness to answer these questions

Regards  
tc

---

<div class="post-metadata">

**Author:** ![Tigor\_Christian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecd19e/32.png) [@Tigor\_Christian](https://www.ruby-forum.com/u/Tigor_Christian)\
**Post date:** [April 17, 2014, 4:12pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/3 "2014-04-17T16:12:26Z")

</div>

Hi all,

I want to simulate a voice transmission system in GNURadio Companion  
(GRC) before I build a real one. My system configuration is as follows.

TX:  
mic → encoder → encryption → modulator → RF

Rx:  
speaker ← decoder ← decryption ← demodulator ← RF

I have succeed in simulating the above configuration in Ubuntu 12.04 LTS  
machine but without encryption/decryption blocks.

I want to encrypt my digital voice using AES (128/192/256, either one)  
algorithm, but so far, I couldn’t find suitable blocks for my purpose.

I know that GNURadio will synthesize a python code when you compile your  
blocks configuration in GRC. On the other hand, every python dev  
installation in Ubuntu will also install PyCrypto lib in your machine,  
this library has a ready-to-use function of AES algorithm. Furthermore,  
I also know the concept of Out-of-Tree Module (OoTM) of GNURadio.

My questions are:

1. My first thought is to get data stream of certain block and do  
encryption process with PyCrypto (not in the OoTM, but directly in  
synthesized  
python code)  
then put them back to the next block. Would it be possible and how to  
achieve this?

2. Do GNURadio has a ready-to-use GRC blocks or OoTM of digital  
encryption algorithm (not scrambler)? and how do I get it (a tutorial  
would be fine)?  
So far, I can not found the block either in GRC or [https://www.cgran.org](https://www.cgran.org)

3. Last question may be off topic a bit. Is it common to use AES  
algorithm to encrypt voice data, or is there any common encryption  
method (preferably could be implemented in GRC)?

Thank you for your time and willingness to answer these questions

Regards  
tc

---

<div class="post-metadata">

**Author:** ![Tigor\_Christian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecd19e/32.png) [@Tigor\_Christian](https://www.ruby-forum.com/u/Tigor_Christian)\
**Post date:** [April 17, 2014, 4:39pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/4 "2014-04-17T16:39:36Z")

</div>

Question 3: AES is indeed a common system for voice encryption, widely  
used  
for example in US police / public safety radios (APCO25 standard). Older  
systems used often DES, but not with a neat linear predictive voice  
codec,  
but just a CVSD digitizer, DES box and FSK radio link (Motorola  
SECURENET).  
Then there are lots of proprietary / closed source encryption systems,  
some  
really weak with 32 bit keys, more aimed against the casual listener /  
scanner kid, but not providing real security against an advanced  
eavesdropping attack.

Ralph.

From: discuss-gnuradio-bounces+ralph=removed\_email\_address@domain.invalid  
[[mailto:discuss-gnuradio-bounces+ralph=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+ralph=removed_email_address@domain.invalid)] On Behalf Of  
Tigor Christian  
Sent: Thursday, April 17, 2014 3:50 PM  
To: removed\_email\_address@domain.invalid  
Subject: [Discuss-gnuradio] Digital voice encryption block

Hi all,

I want to simulate a voice transmission system in GNURadio Companion  
(GRC)  
before I build a real one. My system configuration is as follows.

TX:

mic → encoder → encryption → modulator → RF

Rx:

speaker ← decoder ← decryption ← demodulator ← RF

I have succeed in simulating the above configuration in Ubuntu 12.04 LTS  
machine but without encryption/decryption blocks.

I want to encrypt my digital voice using AES (128/192/256, either one)  
algorithm, but so far, I couldn’t find suitable blocks for my purpose.

I know that GNURadio will synthesize a python code when you compile your  
blocks configuration in GRC. On the other hand, every python dev  
installation in Ubuntu will also install PyCrypto lib in your machine,  
this  
library has a ready-to-use function of AES algorithm. Furthermore, I  
also  
know the concept of Out-of-Tree Module (OoTM) of GNURadio.

My questions are:

1. My first thought is to get data stream of certain block and do  
encryption  
process with PyCrypto (not in the OoTM, but directly in synthesized  
python  
code) then put them back to the next block. Would it be possible and how  
to  
achieve this?

2. Do GNURadio has a ready-to-use GRC blocks or OoTM of digital  
encryption  
algorithm (not scrambler)? and how do I get it (a tutorial would be  
fine)?  
So far, I can not found the block either in GRC or [https://www.cgran.org](https://www.cgran.org)  
[https://www.cgran.org/](https://www.cgran.org/)

3. Last question may be off topic a bit. Is it common to use AES  
algorithm  
to encrypt voice data, or is there any common encryption method  
(preferably  
could be implemented in GRC)?

Thank you for your time and willingness to answer these questions

Regards  
tc

---

<div class="post-metadata">

**Author:** ![Tigor\_Christian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecd19e/32.png) [@Tigor\_Christian](https://www.ruby-forum.com/u/Tigor_Christian)\
**Post date:** [April 17, 2014, 5:05pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/5 "2014-04-17T17:05:33Z")

</div>

-----BEGIN PGP SIGNED MESSAGE-----  
Hash: SHA1

Also, if using encryption over a wireless link, you’ll need some way  
to ensure that damaged data gets resent, or to ensure a damaged block  
does not affect the decryptability of following data.

So I think your flowgraphs should read

Mic/Soundcard → low pass → source coding (at least some uLaw or so)

- → encryption → frame building & channel coding → symbol  
mapping/modulation → pulse shaping → tx system

rx system → freq/time/clock sync (might include deframing) → channel  
decoding (equalizing might happen somewhere here) → decryption →   
source decode → soundcard

As Sean pointed out, this does not necessarily translate nicely into a  
GNU Radio sample flow graph and you might be better of with a  
combination of sample flows and message passing.

With encryption, you really really need the channel code, since a  
single flipped bit will render your transmission unusable.

Also, I don’t really understand: GRC creates python _flow graphs_ out  
of graphical representations. It can generate hier blocks, which are  
just flow sub-graphs internally, but it can not generate blocks that  
have a work function.

If you’re already at ease with designing oot modules, then using a  
python library to encode a block of data seems to be rather trivial,  
and I don’t see how that should be possible or easier from withing GRC  
😉

Greetings,  
Marcus

On 17.04.2014 16:37, Ralph A. Schmid, dk5ras wrote:

> I have succeed in simulating the above configuration in Ubuntu  
> Furthermore, I also know the concept of Out-of-Tree Module (OoTM)  
> encryption algorithm (not scrambler)? and how do I get it (a
> 
> mailing list [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
> [Discuss-gnuradio Info Page](https://lists.gnu.org/mailman/listinfo/discuss-gnuradio)

-----BEGIN PGP SIGNATURE-----  
Version: GnuPG v1  
Comment: Using GnuPG with Thunderbird - [http://www.enigmail.net/](http://www.enigmail.net/)

iQEcBAEBAgAGBQJTT+1xAAoJEBQ6EdjyzlHtZwEIAJk86sf0TWhP+z976wDd8Oi4  
tMk6Nk2rcUMEFP4TopDo4fo0uCH3n6oO9jL+6Wuh2M1gqrpj3jvdfUvPMJRPHVDo  
LpWzE6V2XIcNbShA/XOp56sf3/OqS+qDAXLD2Wa1xnZIW4cPttJ0bWWNaukjxpUO  
5z2M8zkWSy7pIl4eMDIexY6fedzko0ZfO7sw8ynLNmRSA2mNHsJ9qiwrhmVuzqLS  
a7xgQBkFlTpmOx6t4g254uB0wWakPPcw3Td1GzSr3j5p1/Lk/FskJdM/mLTLbGuw  
5CAB2Kl4fBwOy6mPTcNHrF3pDAoPrPqtNSEjFFuvaCytATYo92DeoIc6kYOZHEE=  
=yCnV  
-----END PGP SIGNATURE-----

---

<div class="post-metadata">

**Author:** ![Tigor\_Christian](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/ecd19e/32.png) [@Tigor\_Christian](https://www.ruby-forum.com/u/Tigor_Christian)\
**Post date:** [April 17, 2014, 4:51pm UTC](https://www.ruby-forum.com/t/digital-voice-encryption-block/240504/6 "2014-04-17T16:51:59Z")

</div>

There is no crypto in the main GNU Radio installation. I am not aware of  
any public out-of-tree modules that implement crypto. Your best bet  
would probably be handling crypto at the data socket layer and pushing  
to a GNU Radio PDU-to-tagged-stream or using GR’s message passing  
interface to pass encrypted data packet between the upper layer and GR  
mod/demod layer. You could use PyCrypto, as you suggested, or libgcrypt  
in C/C++. [Libgcrypt - GNU Project - Free Software Foundation (FSF)](http://www.gnu.org/software/libgcrypt/)

GNU Radio is best suited for the PHY and basic MAC layers, but of course  
this doesn’t preclude wrapping libgcrypt functions into GNU Radio  
blocks. I just think it would be more efficient to do crypto at a layer  
above the GR mod/demod blocks. You would essentially pass data between  
the layers using message queues and message handlers.

Sean

From: discuss-gnuradio-bounces+sean.nowlan=removed\_email\_address@domain.invalid  
[[mailto:discuss-gnuradio-bounces+sean.nowlan=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+sean.nowlan=removed_email_address@domain.invalid)] On  
Behalf Of Ralph A. Schmid, dk5ras  
Sent: Thursday, April 17, 2014 10:38 AM  
To: ‘Tigor Christian’; removed\_email\_address@domain.invalid  
Subject: Re: [Discuss-gnuradio] Digital voice encryption block

Question 3: AES is indeed a common system for voice encryption, widely  
used for example in US police / public safety radios (APCO25 standard).  
Older systems used often DES, but not with a neat linear predictive  
voice codec, but just a CVSD digitizer, DES box and FSK radio link  
(Motorola SECURENET). Then there are lots of proprietary / closed source  
encryption systems, some really weak with 32 bit keys, more aimed  
against the casual listener / scanner kid, but not providing real  
security against an advanced eavesdropping attack.

Ralph.

From:  
discuss-gnuradio-bounces+ralph=removed\_email\_address@domain.invalid[mailto:discuss-gnuradio-bounces+ralph=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+ralph=removed_email_address@domain.invalid)  
[[mailto:discuss-gnuradio-bounces+ralph=removed\_email\_address@domain.invalid](mailto:discuss-gnuradio-bounces+ralph=removed_email_address@domain.invalid)] On Behalf Of  
Tigor Christian  
Sent: Thursday, April 17, 2014 3:50 PM  
To: removed\_email\_address@domain.invalid[mailto:removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)  
Subject: [Discuss-gnuradio] Digital voice encryption block

Hi all,

I want to simulate a voice transmission system in GNURadio Companion  
(GRC) before I build a real one. My system configuration is as follows.

TX:  
mic → encoder → encryption → modulator → RF

Rx:  
speaker ← decoder ← decryption ← demodulator ← RF

I have succeed in simulating the above configuration in Ubuntu 12.04 LTS  
machine but without encryption/decryption blocks.

I want to encrypt my digital voice using AES (128/192/256, either one)  
algorithm, but so far, I couldn’t find suitable blocks for my purpose.

I know that GNURadio will synthesize a python code when you compile your  
blocks configuration in GRC. On the other hand, every python dev  
installation in Ubuntu will also install PyCrypto lib in your machine,  
this library has a ready-to-use function of AES algorithm. Furthermore,  
I also know the concept of Out-of-Tree Module (OoTM) of GNURadio.

My questions are:

1. My first thought is to get data stream of certain block and do  
encryption process with PyCrypto (not in the OoTM, but directly in  
synthesized python code) then put them back to the next block. Would it  
be possible and how to achieve this?

2. Do GNURadio has a ready-to-use GRC blocks or OoTM of digital  
encryption algorithm (not scrambler)? and how do I get it (a tutorial  
would be fine)?  
So far, I can not found the block either in GRC or  
[https://www.cgran.org](https://www.cgran.org)[https://www.cgran.org/](https://www.cgran.org/)

3. Last question may be off topic a bit. Is it common to use AES  
algorithm to encrypt voice data, or is there any common encryption  
method (preferably could be implemented in GRC)?

Thank you for your time and willingness to answer these questions

Regards  
tc
