Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(5)  |  Call(5)  |  Derive(0)  |  Import(0)
Given a payload, returns the LIONESS keys to encrypt the off-header
at the swap point.

        def lioness_keys_from_payload(payload):
    '''Given a payload, returns the LIONESS keys to encrypt the off-header
       at the swap point.'''
    digest = sha1(payload)
    return Keyset(digest).getLionessKeys(HIDE_HEADER_MODE)
        


src/m/i/mixminion-HEAD/lib/mixminion/BuildMessage.py   mixminion(Download)
 
    # Encrypt header2 with a hash of the payload.
    key = Crypto.lioness_keys_from_payload(payload)
    header2 = Crypto.lioness_encrypt(header2, key)
 

src/m/i/mixminion-HEAD/lib/mixminion/server/PacketHandler.py   mixminion(Download)
            payload = Crypto.lioness_decrypt(payload, hkey)
 
            hkey = Crypto.lioness_keys_from_payload(payload)
            header2 = Crypto.lioness_decrypt(header2, hkey)
 

src/m/i/mixminion-HEAD/lib/mixminion/test.py   mixminion(Download)
                payload = lioness_decrypt(payload, swapkey)
 
                swapkey = Crypto.lioness_keys_from_payload(payload)
                head2 = lioness_decrypt(head2, swapkey)
 
        payload = lioness_decrypt(payload, swapkey)
 
        swapkey = Crypto.lioness_keys_from_payload(payload)
        head2 = lioness_decrypt(head2, swapkey)
 
            h2 = lioness_decrypt(h2,ks.getLionessKeys(HEADER_ENCRYPT_MODE))
        p = lioness_decrypt(p,Crypto.lioness_keys_from_header(h2))
        h2 = lioness_decrypt(h2,Crypto.lioness_keys_from_payload(p))
 
        sec, _, tag = self.do_header_test(h2, *header_info_2)