{"id":47444085,"url":"https://github.com/fcasal/CryptoUtils.jl","last_synced_at":"2026-04-06T13:00:56.429Z","repository":{"id":61797612,"uuid":"198118693","full_name":"fcasal/CryptoUtils.jl","owner":"fcasal","description":"Cryptography and number-theory primitives in Julia","archived":false,"fork":false,"pushed_at":"2020-07-07T23:59:56.000Z","size":68,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-03-11T04:27:02.797Z","etag":null,"topics":["continued-fractions","cryptography","julia","number-theory","prime-numbers"],"latest_commit_sha":null,"homepage":"","language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fcasal.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}},"created_at":"2019-07-22T00:22:51.000Z","updated_at":"2021-12-17T23:23:02.000Z","dependencies_parsed_at":"2022-10-21T11:15:13.941Z","dependency_job_id":null,"html_url":"https://github.com/fcasal/CryptoUtils.jl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/fcasal/CryptoUtils.jl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcasal%2FCryptoUtils.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcasal%2FCryptoUtils.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcasal%2FCryptoUtils.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcasal%2FCryptoUtils.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fcasal","download_url":"https://codeload.github.com/fcasal/CryptoUtils.jl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fcasal%2FCryptoUtils.jl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31473271,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T08:36:52.050Z","status":"ssl_error","status_checked_at":"2026-04-06T08:36:51.267Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["continued-fractions","cryptography","julia","number-theory","prime-numbers"],"created_at":"2026-03-23T06:00:59.902Z","updated_at":"2026-04-06T13:00:56.415Z","avatar_url":"https://github.com/fcasal.png","language":"Julia","funding_links":[],"categories":["Cryptography"],"sub_categories":["Cryptographic Utilities"],"readme":"# CryptoUtils\n\n[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://fcasal.github.io/CryptoUtils.jl/dev/)\n\n\n## Features\n\nThis package supports a number of cryptographic and number theory related primitives:\n * generation of random prime numbers and safe primes;\n * Jacobi and Legendre symbols;\n * modular square roots;\n * continued fractions of rationals and convergents;\n * \"bytes to number\" and \"number to bytes\" conversion functions;\n * RSA attacks:\n    * Wiener's attack with Dujella's extension;\n    * Factor `n = p*q`, given `e` and `d`.\n\n\n## Installation\nTo install the package, simply run from the julia REPL:\n```\njulia\u003e ]add CryptoUtils\n```\n\n\n## Documentation\nAccess the full [documentation](https://fcasal.github.io/CryptoUtils.jl/dev/).\n\n\n## Example\n\n```julia\njulia\u003e using CryptoUtils\n\njulia\u003e p = random_prime(512); q = random_prime(512); n = p*q # generate semiprime n\n131745220523048272797760331579564741491214753542423769574982847786514776153155250573474208964071358407384440164414712528658264269591534035958596966591477455650082238340858337257106511821924740760868219278777077341070367621453029038918351903399126114774879588852878367966142856170535138849910785240708139225987\n\njulia\u003e e = 65537\n65537\n\njulia\u003e d = invmod(e, (p-1)*(q-1))  # compute RSA decryption exponent\n32362883641310315451899592262377172791965856192371946631485250568611645044625881242387678564972226360689108476233462883544705990145324113781489121643593621753163078450834460663942035227770596133499206721223993086064885467845603112395435294663436699341967664046213003429586468421266641276398515468366056248785\n\njulia\u003e factor_with_ed(n, e, d)  # factor n with e and d\n(11209007052907094316298587866392085453240213973638699831846376613053337678939099626874977325024647359864974367465362518878257931790980202563932031187056729, 11753513928682888932534842071560505691719602160983337271901213762089936749492510218729499032535262339600976674663969869808030961514878135483359095845990203)\n\njulia\u003e p\n11209007052907094316298587866392085453240213973638699831846376613053337678939099626874977325024647359864974367465362518878257931790980202563932031187056729\n\njulia\u003e q\n11753513928682888932534842071560505691719602160983337271901213762089936749492510218729499032535262339600976674663969869808030961514878135483359095845990203\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcasal%2FCryptoUtils.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffcasal%2FCryptoUtils.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffcasal%2FCryptoUtils.jl/lists"}