{"id":15096891,"url":"https://github.com/apache/incubator-milagro-crypto-js","last_synced_at":"2025-10-08T01:30:21.300Z","repository":{"id":57101151,"uuid":"156619550","full_name":"apache/incubator-milagro-crypto-js","owner":"apache","description":"Apache milagro","archived":true,"fork":false,"pushed_at":"2024-03-21T14:26:53.000Z","size":3176,"stargazers_count":19,"open_issues_count":7,"forks_count":10,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-01-21T09:49:12.434Z","etag":null,"topics":["milagro"],"latest_commit_sha":null,"homepage":"https://milagro.apache.org/","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/apache.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2018-11-07T22:59:22.000Z","updated_at":"2024-09-27T14:28:42.000Z","dependencies_parsed_at":"2024-01-23T17:29:14.857Z","dependency_job_id":"e180f99a-12a3-4117-9500-19abbb3b1b41","html_url":"https://github.com/apache/incubator-milagro-crypto-js","commit_stats":{"total_commits":45,"total_committers":10,"mean_commits":4.5,"dds":"0.37777777777777777","last_synced_commit":"937be9413c8ce53f941d367c3253397262b0ff88"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-milagro-crypto-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-milagro-crypto-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-milagro-crypto-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/apache%2Fincubator-milagro-crypto-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/apache","download_url":"https://codeload.github.com/apache/incubator-milagro-crypto-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235669382,"owners_count":19026815,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["milagro"],"created_at":"2024-09-25T16:02:00.094Z","updated_at":"2025-10-08T01:30:14.916Z","avatar_url":"https://github.com/apache.png","language":"JavaScript","funding_links":[],"categories":["Frameworks and Libs"],"sub_categories":["JavaScript"],"readme":"\u003c!--\n    Licensed to the Apache Software Foundation (ASF) under one\n    or more contributor license agreements.  See the NOTICE file\n    distributed with this work for additional information\n    regarding copyright ownership.  The ASF licenses this file\n    to you under the Apache License, Version 2.0 (the\n    \"License\"); you may not use this file except in compliance\n    with the License.  You may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\n    Unless required by applicable law or agreed to in writing,\n    software distributed under the License is distributed on an\n    \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n    KIND, either express or implied.  See the License for the\n    specific language governing permissions and limitations\n    under the License.\n--\u003e\n\n# MCJS - *Milagro Crypto JavaScript*\n\n* **category**:    Library\n* **copyright**:   2023 The Apache Software Foundation\n* **license**:     ASL 2.0 - http://www.apache.org/licenses/LICENSE-2.0\n* **link**:        https://github.com/apache/incubator-milagro-crypto-js\n\n## Description\n\n*MCJS - Milagro Crypto JavaScript*\n\n* MCJS is a standards compliant JavaScript cryptographic library with no\nexternal dependencies except for the random seed source.\n\n* MCJS supports the standards for RSA, ECDH, ECIES, ECDSA and M-PIN, AES-GCM\nencryption/decryption, SHA256, SHA384, SHA512 and SHA3 hash functions and a\ncryptographically secure random number generator. Furthermore we recently\nadded New Hope, a post-quantum key exchange.\n\n* MCJS is [Node.js](https://nodejs.org/en/) compatible and browser compatible\n(see some examples below).\n\n## Install and run  tests\n\n[Node.js](https://nodejs.org/en/) (maximum v8.0.0) and\n[npm](https://www.npmjs.com/) are required in order to build the library and\nrun the tests. Install also the node.js modules required with the command\n\n```\nnpm install\n```\n\nRun all the tests with the following command\n\n```\nnpm test\n```\n\n## Docker\n\nTo create the image execute;\n\n```\ndocker build -t mcjs:builder .\n```\n\nTo run the tests;\n\n```\ndocker run --rm mcjs:builder \n```\n\n## Quick Start\n\n#### Elliptic Curves\n\nSuppose you want to implement ECDH with NIST256 elliptic curve. First you need\nto initialize the context:\n\n```\nvar CTX = require(\"milagro-crypto-js\");\n\nvar ctx = new CTX(\"NIST256\");\n```\n\nthen you can call the functions as follows:\n\n```\nctx.ECDH.KEY_PAIR_GENERATE(...);\nctx.ECDH.ECPSVDP_DH(...);\n```\n\nIf you need to use more than one elliptic curve in the same script you only\nneed to initialize two different contexts, for example\n\n```\nvar ctx1 = new CTX(\"NIST256\");\nvar ctx2 = new CTX(\"C25519\");\n```\n\nThe following is the list of all elliptic curves supported by MCJS\n\n```\n['ED25519', 'C25519', 'SECP256K1', 'NIST256', 'NIST384', 'BRAINPOOL', 'ANSSI', 'HIFIVE', 'GOLDILOCKS', 'C41417', 'NIST521', 'NUMS256W', 'NUMS256E', 'NUMS384W', 'NUMS384E', 'NUMS512W', 'NUMS512E', 'FP256BN', 'FP512BN', 'BN254', 'BN254CX', 'BLS383', 'BLS24', 'BLS48', 'BLS381', 'BLS461'];\n```\n\n#### RSA\n\nThis library supports also RSA encryption/decryption and RSA signature. The following is a quick example on how to use RSA. First initialize the context\n\n```\nvar CTX = require(\"milagro-crypto-js\");\n\nvar ctx = new CTX(\"RSA2048\");\n```\nthen you can call the RSA functions as follows:\n\n```\nctx.RSA.ENCRYPT(...);\nctx.RSA.DECRYPT(...);\n```\n\nThe following is the list of all the RSA security level supported by *MCJS*\n\n```\n['RSA2048','RSA3072','RSA4096'];\n```\n\n#### Other functions\n\nMCJS supports SHA256, SHA384, SHA512, AES-GCM encryption and Marsaglia \u0026 Zaman\nrandom number generator. Those functions are contained in every context initialized\nwith RSA or with an elliptic curve. If you want to create a context supporting only\nthose general functions then initialize it with no parameter as follows:\n\n```\nvar CTX = require(\"milagro-crypto-js\");\n\nvar ctx = new CTX();\n```\n\n## Run examples\n\n[Node.js](https://nodejs.org/en/) examples are provided - please see\n`./examples/node`. Use the following command to run an example\n\n```\nnode ./examples/node/example_ECC_NIST256.js\n```\n\n## Browsers\n\nThe library source code is browser compatible. The browser examples are located\nin `./examples/browser`.\n\n## Docker\n\nThe tests can be run using Docker:\n\n```\ndocker build -t mcjs:builder .\ndocker run --rm mcjs:builder \n```\n\n## Contributors \n\nThe following people have contributed to milagro-crypto-js\n\n- Mike Scott\n- Kealan McCusker\n- Alessandro Budroni\n- Samuele Andreoli\n\nPlease add yourself here if you make or have made a contribution.\n\n## Making a Contribution\n\n1.  [Check for open issues](https://github.com/apache/incubator-milagro-crypto-js/issues)\n    or start a discussion around a feature idea or a bug by sending a mail to\n    dev@milagro.incubator.apache.org\n2.  Fork the repository to start making your changes. Please use the master branch\n    as a basis.\n3.  Write a test which shows that the bug was fixed or that the feature works as expected.\n4.  Make a pull request with a reference to the issue\n\n## Crypto Notice\n\nThis distribution includes cryptographic software. The country in which you\ncurrently reside may have restrictions on the import, possession, use, and/or\nre-export to another country, of encryption software. BEFORE using any\nencryption software, please check your country's laws, regulations and\npolicies concerning the import, possession, or use, and re-export of encryption\nsoftware, to see if this is permitted. See \u003chttp://www.wassenaar.org/\u003e for\nmore information.\n\nThe Apache Software Foundation has classified this software as Export Commodity\nControl Number (ECCN) 5D002, which includes information security software using\nor performing cryptographic functions with asymmetric algorithms. The form and\nmanner of this Apache Software Foundation distribution makes it eligible for\nexport under the \"publicly available\" Section 742.15(b) exemption (see the BIS\nExport Administration Regulations, Section 742.15(b)) for both object code and\nsource code.\n\n## Disclaimer\n\nApache Milagro is an effort undergoing incubation at The Apache Software Foundation (ASF), sponsored by the Apache Incubator. Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-milagro-crypto-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapache%2Fincubator-milagro-crypto-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapache%2Fincubator-milagro-crypto-js/lists"}