BelledonneCommunications / linphone-iphone

Linphone is a free VoIP and video softphone based on the SIP protocol. Mirror of linphone-iphone (git://git.linphone.org/linphone-iphone.git)
http://linphone.org
GNU General Public License v3.0
579 stars 343 forks source link

How to enable post quantum media encryption in 5.2+ version? #847

Open Android-23 opened 1 year ago

Android-23 commented 1 year ago

Hello,

As per the below link, https://wiki.linphone.org/xwiki/wiki/public/view/Lib/Features/Post%20Quantum%20media%20encryption/

image

PQC encryption is available from the 5.2+ version but we need to enable it by CMake.

Do you have any detailed steps to enable PQC encryption in android applications?

Viish commented 1 year ago

Hi,

You simply have to set which algo to use for Post Quantum. In linphone-android we decided to use Kyber 512: https://gitlab.linphone.org/BC/public/linphone-android/-/commit/95de49be304fe82c0a8bd675586787e47c32bdf0

Cheers,

Android-23 commented 1 year ago

Hi, Thanks for your reply. Even after doing the mentioned steps, linphone_core_get_post_quantum_available(); is returning false. Anything else is required to be done?

Viish commented 1 year ago

Then it means you either didn't build our SDK using -DENABLE_PQCRYPTO=ON or you didn't use that SDK for your app build, see https://gitlab.linphone.org/BC/public/linphone-android#building-a-local-sdk

Android-23 commented 1 year ago

Hi, I followed the steps mentioned in the above link and I am able to generate a linphone native SDK build with PQC on Mac OS. Then I pointed this SDK build path in Linphone Android Project and it worked properly.

Now I have copied this generated SDK build folder to a Windows machine and tried to point the same Linphone Android Project with this build (in windows machine) folder but getting PQC disabled.

Any clue?

Viish commented 1 year ago

That means your setup on the windows machine isn't right, probably the path to the local maven repository or the gradle.properties not overriding LinphoneSdkBuildDir variable.

If you want to be sure to use a locally built AAR, then comment out the online repository: https://gitlab.linphone.org/BC/public/linphone-android/-/blob/master/settings.gradle#L16

Android-23 commented 1 year ago

Hi,

Now PQC is enabled in linphone application and I can able to set the Post Quantum ZRTP option in the call setting.

But after setting that media encryption it is not working. I am getting media encryption value from current call params as NONE instead of ZRTP.

Viish commented 1 year ago

Please attach logs from both sides.

Android-23 commented 1 year ago

Hi, Now it is working fine.

Thanks.

Android-23 commented 1 year ago

Hi,

We have a small query for iOS as well.

We have prepared SDK build for iOS with PQC enabled.

But we are not able to find any method(shown in the below screenshot) to set PQC algorithm.

image

Could you please help me out, using which method we can configure PQC in iOS?

Thanks in advance!

Viish commented 1 year ago

As for Android you can use the RC config file. To do it in code, the llinphone_core_set_zrtp_agreement_suites() can be called using Objective-C, or in Swift using core.setZrtpKeyAgreementSuites().

Android-23 commented 1 year ago

Okay. But our issue is, we are not able to find core.setZrtpKeyAgreementSuites() in iOS.

Viish commented 1 year ago

Then check the version you are using/building, as both our Java & Swift wrappers are generating the same methods for a given SDK version.

Viish commented 1 year ago

Actually there might be an issue in our Swift wrapper concerning this method, I'll check.

Android-23 commented 1 year ago

Okay, Thank you.

Android-23 commented 1 year ago

Hi, Can I have an update on the Swift wrapper issue?

Viish commented 1 year ago

Hi,

It hasn't been fixed yet.