{"id":21528647,"url":"https://github.com/nezutero/crypty","last_synced_at":"2025-03-17T18:45:46.220Z","repository":{"id":192413128,"uuid":"685669236","full_name":"nezutero/crypty","owner":"nezutero","description":"abstraction on built in crypto modules","archived":false,"fork":false,"pushed_at":"2024-12-11T23:31:14.000Z","size":30,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-24T06:11:23.551Z","etag":null,"topics":["aes-encryption","crypto","cryptography","des-encryption","encryption","go","golang","rsa","rsa-cryptography","rsa-encryption"],"latest_commit_sha":null,"homepage":"","language":"Go","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/nezutero.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-31T18:33:38.000Z","updated_at":"2024-08-23T01:52:26.000Z","dependencies_parsed_at":null,"dependency_job_id":"f2be35a5-fb59-44bf-b529-0ad2faf6f46e","html_url":"https://github.com/nezutero/crypty","commit_stats":null,"previous_names":["kenjitheman/crypty","btwkenji/crypty","geekenji/crypty","plastiey/crypty","nezutero/crypty"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nezutero%2Fcrypty","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nezutero%2Fcrypty/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nezutero%2Fcrypty/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nezutero%2Fcrypty/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nezutero","download_url":"https://codeload.github.com/nezutero/crypty/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244092140,"owners_count":20396735,"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":["aes-encryption","crypto","cryptography","des-encryption","encryption","go","golang","rsa","rsa-cryptography","rsa-encryption"],"created_at":"2024-11-24T01:53:58.188Z","updated_at":"2025-03-17T18:45:45.990Z","avatar_url":"https://github.com/nezutero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Golang cryptography library \n\n###\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://cdn.jsdelivr.net/gh/devicons/devicon/icons/go/go-original.svg\" height=\"200\" alt=\"go logo\"  /\u003e\n\u003c/div\u003e\n\n###\n\n## Features/Functionality\n\n- **Library that provides cryptographic functions and algorithms, \nincluding encryption, decryption, hashing, and digital signatures, generation**\n  \n- **Encryption**:\n  \n\t- **EncryptAES(key []byte, plaintext []byte) ([]byte, error)**\n   \n\t    - Encrypts the provided plaintext using the AES encryption algorithm.\n\t    - Utilizes AES in CBC mode with a random initialization vector (IV).\n       \n\t- **EncryptDES(key []byte, plaintext []byte) ([]byte, error)**\n   \n\t\t- Encrypts the provided plaintext using the DES encryption algorithm.\n\t\t- Supports DES encryption for data blocks of the correct size.\n    \n\t- **Encrypt3DES(key []byte, plaintext []byte) ([]byte, error**)\n   \n\t    - Encrypts the provided plaintext using the 3DES (Triple DES) encryption algorithm.\n\t    - Requires a 24-byte (192-bit) key.\n\n- **Decryption**:\n  \n\t- **DecryptAES(key []byte, ciphertext []byte) ([]byte, error)**\n   \n\t\t- Decrypts AES-encrypted ciphertext using the provided key.\n    \n\t- **DecryptDES(key []byte, ciphertext []byte) ([]byte, error)**\n   \n\t\t- Decrypts DES-encrypted ciphertext using the provided key.\n    \n\t- **Decrypt3DES(key []byte, ciphertext []byte) ([]byte, error)**\n   \n\t\t- Decrypts 3DES (Triple DES)-encrypted ciphertext using the provided key.\n\n- **Hashing**:\n  \n\t- **CalculateSHA256(data []byte) []byte**\n   \n\t\t- Calculates the SHA-256 hash of the input data.\n    \n\t- **CalculateSHA224(data []byte) []byte**\n   \n\t\t- Calculates the SHA-224 hash of the input data.\n    \n\t- **CalculateSHA3_256(data []byte) []byte**\n   \n\t\t- Calculates the SHA3-256 hash of the input data.\n    \n\t- **CalculateSHA1(data []byte) []byte**\n   \n\t\t- Calculates the SHA-1 hash of the input data.\n    \n\t- **CalculateMD5(data []byte) []byte**\n   \n\t\t- Valculates the MD5 hash of the input data.\n    \n\t- **CalculateSHA512(data []byte) []byte**\n   \n\t\t- Valculates the SHA-512 hash of the input data.\n    \n\t- **CalculateSHA384(data []byte) []byte**\n   \n\t\t- Calculates the SHA-384 hash of the input data.\n\n- **Randomization**:\n  \n    - **GenerateRandomBytes(length int) ([]byte, error)**\n      \n\t\t- Generates a specified number of random bytes.\n\t\t- Uses the crypto/rand package for secure random byte generation.\n\n\t- **GenerateRandomHex(length int) (string, error)**\n   \n\t\t- Generates a random hexadecimal string of the specified length.\n\t\t- Utilizes GenerateRandomBytes internally and encodes the result in hexadecimal.\n\n- **Digital signatures**:\n\n\t- **GenerateRSAKeyPair(bits int) (*rsa.PrivateKey, *rsa.PublicKey, error)****\n \n\t    - Generates an RSA key pair for digital signatures with the specified number of bits.\n\t    - Returns a private key and its corresponding public key.\n       \n\t- **SignDataWithRSA(data []byte, privateKey *rsa.PrivateKey) ([]byte, error)***\n   \n\t\t- Signs a byte array of data using an RSA private key.\n\t\t- Uses the PKCS1v15 signature scheme with SHA-256 hash.\n    \n\t- **VerifySignatureWithRSA(data, signature []byte, publicKey *rsa.PublicKey) error***\n   \n\t    - Verifies a digital signature using an RSA public key.\n\t    - Validates the signature against the data using the PKCS1v15 signature scheme and SHA-256 hash.\n       \n\t- **ExportRSAPrivateKeyToPEM(privateKey *rsa.PrivateKey) (string, error)***\n   \n\t\t- Exports an RSA private key to a PEM-encoded string.\n    \n\t - **ExportRSAPublicKeyToPEM(publicKey *rsa.PublicKey) (string, error)***\n    \n\t\t- Exports an RSA public key to a PEM-encoded string.\n    \n\t - **ImportRSAPrivateKeyFromPEM(keyPEM string) (*rsa.PrivateKey, error)***\n    \n\t\t- Imports an RSA private key from a PEM-encoded string.\n    \n\t- **ImportRSAPublicKeyFromPEM(keyPEM string) (*rsa.PublicKey, error)***\n   \n\t\t- Imports an RSA public key from a PEM-encoded string.\n \n## Project structure:\n\n```go\ncrypty\n│\n├── decrypt\n│   └── decrypt.go\n├── digital_signatures\n│   └── digital_signatures.go\n├── encrypt\n│   └── encrypt.go\n├── go.mod\n├── go.sum\n├── hashing\n│   └── hashing.go\n├── random\n│   └── random.go\n└── README.md\n```\n\n## Installation\n\n```sh\ngo get github.com/nezutero/crypty\n```\n\n## Contributing\n\n- Pull requests are welcome, for major changes, please open an issue first to\n  discuss what you would like to change.\n\n## License\n\n- [MIT](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnezutero%2Fcrypty","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnezutero%2Fcrypty","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnezutero%2Fcrypty/lists"}