[go: up one dir, main page]

Skip to content
/ md5-fips Public
forked from taf2/md5-partial

Calculate an MD5 digest under fips for non crytographic functiosn (eTags)

License

Notifications You must be signed in to change notification settings

washu/md5-fips

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clean room implementation of MD5, for use under fips-140 usage.
There are incendents where we need a md5 hash that isnt related to
communications, such as web server etags.

see test/test.rb for example usage

to patch for rails
require 'openssl'
if OpenSSL.fips_mode
  require 'digest/md5'
  require 'md5fips'
  class Digest::MD5
    class << self
      Digest::MD5.public_methods.each do |method|
        define_method method do |*args, &block|
          Digest::MD5Fips.new.send(method, *args, &block)
        end
      end
    end
  end
end
This will get around using MD5 for cache keys not crypto functions for fips.

About

Calculate an MD5 digest under fips for non crytographic functiosn (eTags)

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C 87.7%
  • Ruby 12.3%