Skip to content

Add Digital Signature Algorithm (DSA) implementation for signing and verifying messages #5336

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from

Conversation

karthikyandrapu
Copy link

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file path/to/your/file.java

@codecov-commenter
Copy link

Codecov Report

Attention: Patch coverage is 0% with 55 lines in your changes missing coverage. Please review.

Project coverage is 42.72%. Comparing base (98bee26) to head (01234b8).

Files Patch % Lines
src/main/java/com/thealgorithms/hashes/DSS.java 0.00% 23 Missing ⚠️
src/main/java/com/thealgorithms/hashes/MD5.java 0.00% 16 Missing ⚠️
src/main/java/com/thealgorithms/hashes/SHA1.java 0.00% 16 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #5336      +/-   ##
============================================
- Coverage     42.87%   42.72%   -0.15%     
- Complexity     2661     2662       +1     
============================================
  Files           522      525       +3     
  Lines         15483    15538      +55     
  Branches       2950     2952       +2     
============================================
+ Hits           6638     6639       +1     
- Misses         8560     8615      +55     
+ Partials        285      284       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


// Initialize the KeyPairGenerator with a key size and a secure random number generator
SecureRandom secureRandom = new SecureRandom();
keyPairGenerator.initialize(1024, secureRandom);

Check failure

Code scanning / CodeQL

Use of a cryptographic algorithm with insufficient key size High

This
key size
is less than the recommended key size of 2048 bits.
public static String getMd5(String input) {
try {
// Create a MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");

Check failure

Code scanning / CodeQL

Use of a broken or risky cryptographic algorithm High

Cryptographic algorithm
MD5
is weak and should not be used.

// Initialize the KeyPairGenerator with a key size and a secure random number generator
SecureRandom secureRandom = new SecureRandom();
keyPairGenerator.initialize(1024, secureRandom);

Check failure

Code scanning / CodeQL

Use of a cryptographic algorithm with insufficient key size High test

This
key size
is less than the recommended key size of 2048 bits.
public static String getMd5(String input) {
try {
// Create a MessageDigest instance for MD5
MessageDigest md = MessageDigest.getInstance("MD5");

Check failure

Code scanning / CodeQL

Use of a broken or risky cryptographic algorithm High test

Cryptographic algorithm
MD5
is weak and should not be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants