2

I'm reading some basic info about Web Cryptography API and I'm wondering if is possible to implement some crypto provider (C/C++ library or something) with some extra algorithms or is mandatory to use the ones "embedded" with the web browser. I have finded articles about the security and tutorials about how to use it but nothing about custom implementation. I don't know if it uses Operating System libraries or only web browser libraries, if should be used "as is"... Some reference or clarification is appreciated.

RobertGG
  • 47
  • 4
  • i don't see how you'd run c/c++ from the browser for normal users. you can use as much or as little api as you wish, nobody enforces any kind of restrictions... – dandavis May 26 '20 at 15:54

1 Answers1

1

See the specification 5.1:

This specification assumes, but does not require, that conforming user agents do not and will not be directly implementing cryptographic operations within the user agent itself.

...

While it is assumed that most user agents will be interacting with a cryptographic provider that is implemented purely in software, it is not required by this specification. As a result, the capabilities of some implementations may be limited by the capabilities of the underlying hardware, and, depending on how the user has configured the underlying cryptographic library, this may be entirely opaque to the User Agent.

Does it answer your question?

mentallurg
  • 8,536
  • 4
  • 26
  • 41
  • I know little about web programming. Apparently I should figure out how the user agent connects with the underlying crypto layer in every specific operating system and extend that layer with my provider. For example assuming Internet Explorer uses CryptoAPI I should implement a new CryptoAPI provider, is n't it? My idea was to implement a local web page (offline) to encrypt data instead of use a desktop app. I want to use my C/C++ libraries. I have been using it in C/C++/Java/C# applications and I was thinking in a custom provider for the web browser, just to test. – RobertGG May 26 '20 at 16:32
  • 1
    @RobertGG: *extend that layer with my provider* - To my knowledge, there is no way to extend it in browsers. If you implement some JavaScript that will run in browser, file operations with local files will remain very limited. In browser you cannot use standard libraries that you may find convenient. If you want to provide some common cross-platform functionality, I'd suggest you to do that with C++, C#, Java or Python, that would much easier. Why do you want to implement your functionality in browser? – mentallurg May 26 '20 at 18:45
  • Ok it was only an idea, I already have C++ libraries with desktop applications in Qt and wrappers for Java and .NET. I was reading about the Web API and come to my mind the idea of some local web browser utility, is not really necessary. Thanks for your answers, apparently was a silly idea. – RobertGG May 26 '20 at 21:43