saad-g
حزمة Python باسم saad_g تعيد تقديم واجهة خوارزميات GM نفسها المتاحة في gmalg، مع اسم استيراد جديد:
import saad_g
هذه الحزمة مبنية من المصدر المفتوح لمشروع gmalg المرخص بترخيص MIT. تم الاحتفاظ بملف الترخيص وإشعار حقوق المؤلف في LICENSE.gmalg. المصدر upstream هو:
https://github.com/ww-rm/gmalg
التثبيت
python -m pip install saad-g
الخوارزميات والواجهات
تتضمن الحزمة ZUC وSM2 وSM3 وSM4 وSM9 وSM9KGC، إضافة إلى KEYXCHG_MODE وPC_MODE ووحدات utils وbcmode وباقي الوحدات الداخلية اللازمة للتوافق.
SM3
import saad_g
sm3 = saad_g.SM3()
sm3.update(b"hello")
print(sm3.value().hex())
SM4
import saad_g
key = bytes.fromhex("0123456789ABCDEFFEDCBA9876543210")
sm4 = saad_g.SM4(key)
cipher = sm4.encrypt(b"0102030405060708")
print(sm4.decrypt(cipher))
ZUC
import saad_g
zuc = saad_g.ZUC(
bytes.fromhex("3d4c4be96a82fdaeb58f641db17b455b"),
bytes.fromhex("84319aa8de6915ca1f6bda6bfbd8c766"),
)
print(zuc.generate().hex())
تنبيه أمني
هذه خوارزميات تشفير منخفضة المستوى. لا تستخدمها لحماية بيانات حقيقية قبل مراجعة مختص واختبار التوافق مع معيارك ومتطلبات إدارة المفاتيح. لا تضع المفاتيح السرية داخل الشفرة أو في مستودع عام، ولا تستخدم أمثلة المفاتيح المنشورة للإنتاج.
الترخيص
هذا التوزيع يتضمن كود gmalg المرخص بترخيص MIT. راجع LICENSE.gmalg للتفاصيل الكاملة.
Metadata
Release files for saad-g 1.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| saad_g-1.1.2-py3-none-any.whl | Python 3 | none | any | Details for saad_g-1.1.2-py3-none-any.whl |
Release files / saad_g-1.1.2-py3-none-any.whl
| Download URL | saad_g-1.1.2-py3-none-any.whl |
|---|---|
| Size | 33.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
dd7de6458b4768478d9863ed2ec1bec5aa7f62185b6215b30668cc38da4b1812
|
|
BLAKE2b-256 checksum How to use checksums |
d78ca3fa9d8a0346d655772b3e4c94f4b1a7bba4d9e66f239d875eafd46a0cae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.4
|
Security for saad-g 1.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.