#NEWLINE# def _internal_ckeck( keypair , u , EncE , secrets , all_attribs ) : #NEWLINE# #INDENT# ' Check the invariant that the ciphertexts are the encrypted attributes ' #NEWLINE# ( priv , pub ) = keypair #NEWLINE# ( a , b ) = EncE #NEWLINE# Cred = ( b - ( priv * a ) ) #NEWLINE# ( sk , _ ) = secrets #NEWLINE# v = Hx ( sk , all_attribs ) #NEWLINE# assert ( Cred == ( v * u ) )