सार्वजनिक जानकारी से बना चयन मार्गदर्शन। केवल संदर्भ हेतु।
वेबक्रिप्टो पैकेज फ्लटर के लिए वेब क्रिप्टोग्राफी एपीआई का क्रॉस-प्लेटफॉर्म इम्प्लीमेंटेशन प्रदान करता है, जो एंड्रॉइड, आईओएस, वेब, मैकओएस, विंडोज और लिनक्स पर कुंजी उत्पादन, एन्क्रिप्शन, डिक्रिप्शन और डिजिटल सिग्नेचर जैसे सुरक्षित क्रिप्टोग्राफिक ऑपरेशन को सक्षम करता है। यह ब्राउज़र-आधारित वेब क्रिप्टो एपीआई के समान एक स्थिर इंटरफेस प्रदान करता है, जिससे फ्लटर एप्लिकेशन में सुरक्षित डेटा हैंडलिंग को लागू करना आसान होता है। यह पैकेज ऐसे एप्लिकेशन के लिए विशेष रूप से उपयोगी है जिन्हें प्लेटफॉर्म-विशिष्ट कोड के बिना मजबूत सुरक्षा विशेषताओं की आवश्यकता होती है। यह पैकेज गूगल द्वारा बनाए रखा जाता है और गिटहब पर ओपन-सोर्स किया गया है।
उपयोग
सुरक्षित डेटा एन्क्रिप्शन
डिजिटल हस्ताक्षर वेरिफिकेशन
की प्रबंधन
क्रॉस-प्लेटफ़ॉर्म क्रिप्टोग्राफी
सुरक्षित τोकन संचालन
मुख्य विशेषताएँ
प्लेटफॉर्म के अनुकूलता
वेब क्रिप्टो एपीआई विनिर्माण के अनुरूप
सममित और असममित क्रिप्टोग्राफी का समर्थन करता है
ओपन-सोर्स और गूगल द्वारा बनाए रखा जाता है
मूल कोड की आवश्यकता नहीं है
इनके लिए उपयुक्त
सुरक्षित डेटा स्टोरेज की आवश्यकता वाले ऐप्स
प्रमाणीकरण प्रणाली
सुरक्षित संचार प्रोटोकॉल
गोपनीयता-केंद्रित एप्लिकेशन
वेब क्रिप्टो एपीआई के साथ परिचित विकासकर्मी
विचार योग्य बातें
क्रिप्टोग्राफिक अवधारणाओं की समझ की आवश्यकता है
उच्च प्रदर्शन वाले क्रिप्टो-भारी कार्यभार के लिए उपयुक्त नहीं
डार्ट के एसिंक मॉडल पर निर्भर करता है
मानक वेब क्रिप्टो एल्गोरिदम तक सीमित
उत्पादन उपयोग के लिए अतिरिक्त प्रमाणीकरण की आवश्यकता हो सकती है
मूल README
संबंधित सोर्स रिपॉज़िटरी के मूल README का स्नैपशॉट। नवीनतम सामग्री के लिए रिपॉज़िटरी देखें।
Cross-Platform Web Cryptography Implementation
This package provides a cross-platform implementation of the
Web Cryptography API.
Disclaimer: This is not an officially supported Google product.
This packages provides an implementation of the
Web Cryptography API across multiple platforms. Outside the
browser, this package features a native implementation embedding
BoringSSL using dart:ffi. When used inside a
web browser this package wraps the window.crypto APIs and
providing the same Dart API as the native implementation.
This way, package:webcrypto provides the same crypto API on Android, iOS, Web, Windows, Linux and Mac.
BoringSSL, Chrome and Firefox implementations pass the same test cases.
Missing:
Exceptions and errors thrown for invalid input is not tested yet.
The native implementation executes on the main-thread, however, all expensive
APIs are asynchronous, so they can be offloaded in the future.
For a discussion of the API design of this package,
see doc/design-rationale-md.
System dependencies
When you have a dependency on package:webcrypto, it will use
hooks to build BoringSSL. Thus, your system
must have:
cmake, and,
a C compiler (like gcc or clang)
Limitations
This package has a few limitations compared to the
Web Cryptography API. For a discussion of parity with
Web Cryptography APIs see doc/webcrypto-parity.md.
deriveKey is not supported, however, keys can always be created from
derivedBits which is supported.
wrapKey is not supported, however, keys can be exported and encrypted.
unwrapKey is not supported, however, keys can be decrypted and imported.
AES-KW is not supported because it does not support encrypt/decrypt.
Compatibility notes
This package has many tests cases to asses compatibility across the native
implementation using BoringSSL and various browser implementations of the
Web Cryptography APIs.
At the moment compatibility testing is limited to native implementation,
Chrome, Firefox and Safari.
Known Issues:
Chrome and BoringSSL does not support valid ECDH spki-formatted keys exported
by Firefox prior to version 72.
Firefox does not support PKCS8 import/export for ECDSA and ECDH keys.
Firefox does not handle counter wrap around for AES-CTR.
Safari does not support P-521 for ECDSA and ECDH.
The browser implementation of streaming methods for encryption,
decryption, signing and verification buffers the entire input, because
window.crypto does not expose a streaming API. However, the native
implementation using BoringSSL does support streaming.
In browsers, operations backed by window.crypto.subtle require a secure
context. When loaded from an insecure context, package:webcrypto throws
UnsupportedError for those operations with guidance to use HTTPS or a
trustworthy local origin such as localhost. fillRandomBytes() continues
to work because it uses window.crypto.getRandomValues(), which browsers
expose outside secure contexts.