gegel / pairphone

The effort for P2P private talk over GSM-FR compressed voice channel
GNU General Public License v3.0
39 stars 31 forks source link

Use pairphone to achieve End to End Encryption for GSM Voice call #1

Open gurtajs4 opened 6 years ago

gurtajs4 commented 6 years ago

Hi, First of all thanks for such a great code. I am grateful that you have decided to publish this as open source.

I wanted to develop a software hosted on Raspberry Pi,

which can catch voice audio from headset(USB Sound Card) , custom encrypt it and then send it as regular stream via regular GSM call over Phone Network, and on the other side, we can do the reverse, decrypt the audio via another raspberry pi and USB Sound Card and output the actual audio to speaker.

Just like jackpair or hackencrypt AECall

http://mrhyper.blogspot.com/2015/12/iphone-encrypt-phone-call_9.html

Regards, Singh

gegel commented 6 years ago

See HW open source code of our new improved audio encrypting tool on Cortex M4 chip: https://github.com/gegel/pairphone It has much better modems (BPSK for VHF and Pulse for GSM/AMR channels) and modern encryption. Some codes (MELPE) is not free, so officially it is for education only.

25 July 2018, 13:10:20, by gurtajs4 notifications@github.com:

Hi, First of all thanks for such a great code. I am grateful that you have decided to publish this as open source.

I wanted to develop a software hosted on Raspberry Pi,

which can catch voice audio from headset(USB Sound Card) , custom encrypt it and then send it as regular stream via regular GSM call over Phone Network, and on the other side, we can do the reverse, decrypt the audio via another raspberry pi and USB Sound Card and output the actual audio to speaker.

Just like jackpair or hackencrypt AECall

http://mrhyper.blogspot.com/2015/12/iphone-encrypt-phone-call_9.html

Regards, Singh

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

gurtajs4 commented 6 years ago

Hi Van,

I guess you are referring to https://github.com/gegel/jackpair

I have looked into that and I am not an expert on ARM or Micro-controllers.

I would like to use PairPhone first and develop the System Side application which can do P2P Encryption over GSM Voice call.

I followed the instruction here http://torfone.org/pairphone/ Had the setup like below...

System#1<-> USB-SoundCard#1<-> Cross-Cable(for Mic and Speaker) <->USB-SoundCard#2<-> System#2

Note. I am not using any Mobile Phone or GSM Mobile network between 2 System,

Started ./pp in both System, pressed F4 on System#1 to initiate the guest call...

It says conntected but then nothing works, only noise

Can you guide me and tell me whats I am doing wrong, I would really like to make this work :)

Regards, Singh

gegel commented 6 years ago

Do you hear the modem carrier on Line side? If not check audio devices settings in conf.txt file: AudioInput and AudioOutput for Mike (8 KHz mono) and _AudioInput and _AudioOutput for Line (48 KHz mono). And see program's console output at the start: is devices use correctly?

Usually USB card plugged to RPI  will be plughw:0,0  and on-board card will be plughw:1,0, please change this in  conf.txt.

PairPhone will be work good over direct connecting, acoustic connecting and VHF radio.  But not so good over real GSM connecting: some network providers set AMR narrow band trans-coding and modem fails. In new JackPair project modem significantly improved and use lower bitrate (800 bps instead 1200) so works better.

You can port C source of new modems to old pairphone code later.

Now JackPair is ready-to-use code for low-cost and low-power HW and are practically better then pairphone.

26 July 2018, 18:02:47, by gurtajs4 notifications@github.com:

Hi Van,

I guess you are referring to https://github.com/gegel/jackpair

I have looked into that and I am not an expert on ARM or Micro-controllers.

I would like to use PairPhone first and develop the System Side application which can do P2P Encryption over GSM Voice call.

I followed the instruction here http://torfone.org/pairphone/ Had the setup like below...

System#1<-> USB-SoundCard#1<-> Cross-Cable(for Mic and Speaker) <->USB-SoundCard#2<-> System#2

Note. I am not using any Mobile Phone or GSM Mobile network between 2 System,

Started ./pp in both System, pressed F4 on System#1 to initiate the guest call...

It says conntected but then nothing works, only noise

Can you guide me and tell me whats I am doing wrong, I would really like to make this work :)

Regards, Singh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

gurtajs4 commented 6 years ago

Hi Van,

I check everything twice as you asked, also took some snapshots Please check zip for respective file

PC_Audio_Device_Details.JPG contain Audio Detail on Laptop side PI_Audio_Device_Details.JPG contain Audio on Raspberry PI side

PC_PP_START.JPG is Logs from PP Start on Laptop side PI_PP_START.JPG is Logs from PP Start on Raspberry PI

PC_CALL_INITIATE.JPG is Logs from PP Call initiate on Laptop side [Press f4] PI_CALL_INITIATE.JPG is Logs from PP Call initiate on Raspberry PI side [Press f4]

PC_Password_Reset.JPG is Logs from Password Reset on Laptop side [Press f7] PI_Password_Reset.JPG is Logs from Password Reset on Raspberry pi side [Press f7]

LINE_IN_OUT_PC_PI_CONNECTION.JPG Audio Cross connection between Laptop and Raspberry Pi Line-IN SOUND_CARD_LEFT_MIC_RIGHT_OUT.JPG USB Audio Sound Card Left-Microphone, Right-Speaker

https://www.dropbox.com/s/uldv62u8ybzk2z7/attachments.zip?dl=0

I hear lot of continuous Static on Raspberry PI Headset side Few concerns, I feel that authentication is not happening properly, also observed that https://github.com/gegel/pairphone/blob/master/crypto/sprng.c#L27 has all the seed method enable , whereas FILESEED might fail as not seed file is present

Other thing is there are no POSIX mutex used .

Van, can you look at the logs and suggest me the correct path to test it?

Thanks, Singh

gurtajs4 commented 6 years ago

Hi Van,

I found the problem with my Jabra Headset, which was causing the issue. I have been using the cross cable setup, the connection not so good and I keep hearing noise other than actual decrypted voice sometime, but Audio encoding and decoding seems to work now :)

PairPhone will be work good over direct connecting, acoustic connecting and VHF radio. But not so good over real GSM connecting: some network providers set AMR narrow band trans-coding and modem fails. In new JackPair project modem significantly improved and use lower bitrate (800 bps instead 1200) so works better.

Now moving on to the above problem, i haven't tested it over GSM Voice Channel but I agree, it might not be good as Operators set narrow band AMR re-encoding.

So if I have to take up the code from JackPair Project and port to this PairPhone project so that I can run this on Ubuntu Laptop, can you share some details on which all module should be changed.

I understand Audio Compression Library code is here https://github.com/gegel/pairphone/tree/master/melpe

and pseudo speech modem Code library is here https://github.com/gegel/pairphone/tree/master/modem

but i dont understand the similar module on Jackpair project, so would need your guidance if possible. Please can you comment or provide the code that can be integrated with this Pairphone to achieve the required bitrate 800 bps.

Thanks, Singh

gurtajs4 commented 6 years ago

Hi Van,

Did you get chance to look into this.

Regards, Gurtaj

gegel commented 6 years ago

Hi! Sorry for so late replay, I have some vacation. The using JackPair code with PairPhone is not so trivial.

You must:

  1. change sampling rate of Headset part (Mike and Speaker) from 8KHz to 6KHz and back using rate changing procedures
  2. exclude 8 bits of Furier magnitudes and one sync bit from melpe compressed frame (must be 72 bits instead 81 bits)
  3. use pls modem from JackPair code, with fine resampler for tuning line record sampling rate (in JackPair it changes by hardware: tuning divider of ADC Timer ).

Not use melpe code from JackPair directly: it use ETSI math for Cortex F4 ARM processor (for perfomance reason) and can be unsuitable for others ARM (on your Linux board) and also not be compatible in i86 and others architectures.

Now I haven't time for support Linux version of JackPair (I improve Cortex version instead and port on low-cost new Nuvoton M451LIDAE chip), but maybe later I can help you. Best regards, Van.

31 July 2018, 12:50:06, by gurtajs4 notifications@github.com:

Hi Van,

I found the problem with my Jabra Headset, which was causing the issue. I have been using the cross cable setup, the connection not so good and I keep hearing noise other than actual decrypted voice sometime, but Audio encoding and decoding seems to work now :)

PairPhone will be work good over direct connecting, acoustic connecting and VHF radio. But not so good over real GSM connecting: some network providers set AMR narrow band trans-coding and modem fails. In new JackPair project modem significantly improved and use lower bitrate (800 bps instead 1200) so works better.

Now moving on to the above problem, i haven't tested it over GSM Voice Channel but I agree, it might not be good as Operators set narrow band AMR re-encoding.

So if I have to take up the code from JackPair Project and port to this PairPhone project so that I can run this on Ubuntu Laptop, can you share some details on which all module should be changed.

I understand Audio Compression Library code is here https://github.com/gegel/pairphone/tree/master/melpe

and pseudo speech modem Code library is here https://github.com/gegel/pairphone/tree/master/modem

but i dont understand the similar module on Jackpair project, so would need your guidance if possible. Please can you comment or provide the code that can be integrated with this Pairphone to achieve the required bitrate 800 bps.

Thanks, Singh

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

ASIFKHAN95 commented 3 years ago

Hi Van,

I guess you are referring to https://github.com/gegel/jackpair

I have looked into that and I am not an expert on ARM or Micro-controllers.

I would like to use PairPhone first and develop the System Side application which can do P2P Encryption over GSM Voice call.

I followed the instruction here http://torfone.org/pairphone/ Had the setup like below...

System#1<-> USB-SoundCard#1<-> Cross-Cable(for Mic and Speaker) <->USB-SoundCard#2<-> System#2

Note. I am not using any Mobile Phone or GSM Mobile network between 2 System,

Started ./pp in both System, pressed F4 on System#1 to initiate the guest call...

It says conntected but then nothing works, only noise

Can you guide me and tell me whats I am doing wrong, I would really like to make this work :)

Regards, Singh

hi sing i want to develop this project using raspberry pi can you help me ?

ASIFKHAN95 commented 3 years ago

anyone have developed this project ?