示例#1
0
    def specification(self):
        (k, k_p) = ptr_to_fresh(self, LLVMArrayType(i8, 32))
        (v, v_p) = ptr_to_fresh(self, LLVMArrayType(i8, 8))
        (m, m_p) = ptr_to_fresh(self, LLVMArrayType(i8, self.size))

        self.execute_func(k_p, v_p, cryptol('0 : [32]'), m_p, cryptol(f'{self.size!r} : [32]'))

        self.points_to(m_p, cryptol("Salsa20_encrypt")((k, v, m)))
        self.returns(cryptol('0 : [32]'))
示例#2
0
    def specification(self):
        k = self.fresh_var(LLVMArrayType(i8, 32))
        n = self.fresh_var(LLVMArrayType(i8, 16))
        k_p = self.alloc(LLVMArrayType(i8, 32), read_only=True)
        n_p = self.alloc(LLVMArrayType(i8, 16), read_only=True)
        ks_p = self.alloc(LLVMArrayType(i8, 64))
        self.points_to(k_p, k)
        self.points_to(n_p, n)

        self.execute_func(k_p, n_p, ks_p)

        self.returns(void)
        self.points_to(ks_p, cry_f("Salsa20_expansion `{{a=2}} {(k, n)}"))
示例#3
0
 def specification(self) -> None:
     oneptr_update_func(self, LLVMArrayType(i8, 64), "Salsa20")
示例#4
0
 def specification(self) -> None:
     oneptr_update_func(self, LLVMArrayType(i32, 16), "doubleround")