Dll load failed, in python 2.7 running on windows 8.1
Question: I'am using Boneh-Lynn-Shacham Identity Based Signature scheme for my final
year project for getting encryption keys

    
    
    from charm.toolbox.pairinggroup import *
    from charm.engine.util import *
    debug = False
    class IBSig():
        def __init__(self, groupObj):
            global group
            group = groupObj
    
        def dump(self, obj):
            ser_a = serializeDict(obj, group)
            return str(pickleObject(ser_a))
    
        def keygen(self, secparam=None):
            g, x = group.random(G2), group.random()
            g_x = g ** x
            pk = { 'g^x':g_x, 'g':g, 'identity':str(g_x), 'secparam':secparam }
            sk = { 'x':x }
            return (pk, sk)
    
        def sign(self, x, message):
            M = self.dump(message)
            if debug: print("Message => '%s'" % M)
            return group.hash(M, G1) ** x
    
        def verify(self, pk, sig, message):
            M = self.dump(message)
            h = group.hash(M, G1)
            if pair(sig, pk['g']) == pair(h, pk['g^x']):
                return True  
            return False 
    
    def main():
        groupObj = PairingGroup('../param/d224.param')
    
        m = { 'a':"hello world!!!" , 'b':"test message" }
        bls = IBSig(groupObj)
    
        (pk, sk) = bls.keygen(0)
    
        sig = bls.sign(sk['x'], m)
    
        if debug: print("Message: '%s'" % m)
        if debug: print("Signature: '%s'" % sig)     
        assert bls.verify(pk, sig, m)
        if debug: print('SUCCESS!!!')
    
    if __name__ == "__main__":
        debug = True
        main()
    

when I am implementing it in python the code was not able to find the module
named pairing though I have added Charm module to my library.Getting error
like

    
    
    Traceback (most recent call last):
     File "C:\Users\Sailesh\Desktop\bls.py", line 1, in <module>
       from charm.toolbox.pairinggroup import *
     File "C:\Python27\lib\charm\toolbox\pairinggroup.py", line 2, in <module>
       from charm.core.math.pairing import serialize 
    ImportError: DLL load failed: The specified module could not be found.
    

I have taken the code from [Boneh-Lynn-Shacham Identity Based Signature
code](https://code.google.com/p/charm-
crypto/source/browse/trunk/schemes/sig_short_bls04.py?r=120) and downloaded
the module charm from [charm module
link](https://github.com/JHUISI/charm/downloads). Let me know where is the
error or whether the problem is with the module. I cant figure out what is the
problem. Thanks in advance.


Answer: Try the 0.43 version directly fron github:

<https://github.com/JHUISI/charm/releases>

