Code Monkey home page Code Monkey logo

Comments (11)

WeiDaiWD avatar WeiDaiWD commented on July 24, 2024

Android/IOS devices are mostly 64-bit and support C++ nowadays. I do not see any issue in compiling. For IOS, you do need to write a thin wrapper in Object-C++ to interface with IOS. For Android, we do have a demo application built for Android devices. Please leave this issue open so that it reminds me to send you a link to the source code of that application as soon as it is released.

FYI, in general, homomorphic encryption involves two parties: a client who performs key generation, encryption, and decryption; and a server who performs evaluation. SEAL provides functionalities for both parties. It is not normal to consider an Android/IOS device as the server. Evaluation is computational intense and should be offloaded to a more powerful platform, while key generation, encryption, and decryption are possible and reasonable to be implemented on a mobile device, which is exactly what we do in the aforementioned demo. Unless there is a server running Android/IOS, you should follow the same approach.

from seal.

alexej-sh avatar alexej-sh commented on July 24, 2024

It is not normal to consider an Android/IOS device as the server. Evaluation is computational intense

If we are talking about 20-30 operations (add/sub/mult) on mobile phone, do you think it will take lot of time? Are we talking about milliseconds, seconds or minutes?

from seal.

WeiDaiWD avatar WeiDaiWD commented on July 24, 2024

That overhead highly relies on parameter selection. 20-30 multiplications of ciphertexts can take from milliseconds to seconds (not likely in minutes, but I am not sure what will happen if the mobile phone has power management turned on or has other programs occupying resources). You may test the performance when that Android version is released.

You've got me curious. In what scenario would you want to have a mobile phone perform encrypted computation for you? Maybe move to private chat if you prefer that way. No pressure at all if you do not want to disclose the idea.

from seal.

alexej-sh avatar alexej-sh commented on July 24, 2024

You've got me curious. In what scenario would you want to have a mobile phone perform encrypted computation for you?

My usecase requires to perform computation on data of two different users A and B. So the idea is that user A generates pub, priv keys and encrypt his data. Then sends his encrypted data with his pub key and params to user B. User B encrypts his data with A's pub key and performs computation on data of both users. After that user B sends the encrypted result to user A and he decrypts the result and shares it with user B. Basically I want do computation on input-data of two different sources und only the creator of the input should know the content of it.
Do you think there are some problems with this approach (besides performance issues) or are there better ways to do it?

from seal.

kimlaine avatar kimlaine commented on July 24, 2024

In the scenario you describe both parties need to be semi-honest and not try to attack each other. What you describe amounts to a decryption oracle for B, which exposes the secret key of A to key recovery attacks if B sends a malformed/malicious ciphertext to A instead of a correct ciphertext produced according to the protocol description in your use-case.

Note also that in SEAL it's possible to compute encrypted-encrypted computations but also encrypted-plain computations, so B may not need to encrypt its data at all.

from seal.

alexej-sh avatar alexej-sh commented on July 24, 2024

What you describe amounts to a decryption oracle for B, which exposes the secret key of A to key recovery attacks if B sends a malformed/malicious ciphertext to A instead of a correct ciphertext produced according to the protocol description in your use-case.

This is a good point but luckely in my specific use-case this will not be an issue.

Note also that in SEAL it's possible to compute encrypted-encrypted computations but also encrypted-plain computations, so B may not need to encrypt its data at all.

Thank you for this tipp :)

from seal.

BrentLagesse avatar BrentLagesse commented on July 24, 2024

I am also very interested in a link to that application when it is released as I intend to use SEAL in an Android application in the near future.

from seal.

zkingri avatar zkingri commented on July 24, 2024

Android/IOS devices are mostly 64-bit and support C++ nowadays. I do not see any issue in compiling. For IOS, you do need to write a thin wrapper in Object-C++ to interface with IOS. For Android, we do have a demo application built for Android devices. Please leave this issue open so that it reminds me to send you a link to the source code of that application as soon as it is released.

May I have the source code of the demo application built for Android devices? Thank you.

from seal.

kimlaine avatar kimlaine commented on July 24, 2024

The app source code is available at https://GitHub.com/Microsoft/SEAL-Demo.

from seal.

WeiDaiWD avatar WeiDaiWD commented on July 24, 2024

The app source code is available at https://GitHub.com/Microsoft/SEAL-Demo.
@alexej-sh @BrentLagesse @zkingri FYI
I am closing this issue.

from seal.

attackjie avatar attackjie commented on July 24, 2024

该应用程序源代码可从https://GitHub.com/Microsoft/SEAL-Demo获取。

Where can I find the seal method for building on Android? Are there any relevant demos available?

from seal.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.