Skip to content

marinthiercelin/go-srp

 
 

Repository files navigation

go-srp

Introduction

srp libaray used in all Protonmail clients

License

Copyright (c) 2019 Proton Technologies AG

Please see LICENSE file for the license.

Doc

Secure Remote Password (SRP) Protocol

Folders

The root folder contains the main logic.

The windows folder contains the warpper for .net.

Setup

Setup Go Mobile and build/bind the source code:

Go Mobile repo: https://github.com/golang/mobile

Go Mobile wiki: https://github.com/golang/go/wiki/Mobile

  1. Install Go: brew install go

  2. Install Gomobile: go get -u golang.org/x/mobile/cmd/gomobile

  3. Install Gobind: go install golang.org/x/mobile/cmd/gobind

  4. Install Android SDK and NDK using Android Studio

  5. Set env: export ANDROID_HOME="/AndroidSDK" (path to your SDK)

  6. Init gomobile: gomobile init -ndk /AndroidSDK/ndk-bundle/ (path to your NDK)

  7. Copy Go module dependencies to the vendor directory: go mod vendor

  8. Build examples: gomobile build -target=android #or ios

    Bind examples: gomobile bind -target ios -o frameworks/name.framework gomobile bind -target android

    The bind will create framework for iOS and jar&aar files for Android (x86_64 and ARM).

Other notes

If you wish to use build.sh, you may need to modify the paths in it.

use go mod

go mod vender
./build.sh

use glide

glide i
./build.sh

Dependencies

bcrypt

golang.org/x/mobile

ProtonMail Crypto

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 56.6%
  • C# 24.0%
  • Swift 10.7%
  • C 5.3%
  • Shell 2.6%
  • Batchfile 0.8%