def __init__(self): mmiodev.__init__(self) self.addReg('sha_start', 0xfe00, 1, readonly=True) self.addReg('sha_state', 0xfe01, 1, readonly=True) self.addReg('sha_rdaddr', 0xfe04, 2) self.addReg('sha_wraddr', 0xfe08, 2) self.addReg('sha_len', 0xfe0c, 2) self.rd_data = [0] * 64 self.hs_data = [0] * 20 self.sha = SHAFunc.new()
def __init__(self): mmiodev.__init__(self) self.addReg('aes_start', 0xff00, 1, readonly=True) self.addReg('aes_state', 0xff01, 1, readonly=True) self.addReg('aes_addr', 0xff02, 2) self.addReg('aes_len', 0xff04, 2) self.addReg('aes_keysel', 0xff06, 1) self.addReg('aes_ctr', 0xff10, 0x10) self.addReg('aes_key0', 0xff20, 0x10) self.addReg('aes_key1', 0xff30, 0x10) self.byte_cnt = 0 self.rd_data = [0] * 16 self.enc_data = [0] * 16
def __init__(self): mmiodev.__init__(self) self.addReg('sha_start', self.ADDR_START, 1, readonly=True) self.addReg('sha_state', self.ADDR_STATE, 1, readonly=True) self.addReg('sha_rdaddr', self.ADDR_RDADDR, 2) self.addReg('sha_wraddr', self.ADDR_WRADDR, 2) self.addReg('sha_len', self.ADDR_LEN, 2) self.bytes_read = 0 self.rd_data = [0] * 64 self.hs_data = [0] * 20 self.xram = mmiodev self.sha = SHAFunc.new()
def __init__(self): mmiodev.__init__(self) self.addReg('rsa_start', 0xfe00, 1) self.addReg('rsa_state', 0xfd01, 1, readonly=True) self.addReg('rsa_addr', 0xfd02, 2) """ self.addReg ('rsa_M', 0xfa00, 256) self.addReg ('rsa_E', 0xfb00, 256) self.addReg ('rsa_N', 0xfc00, 256) """ self.rsa_M = [0] * 256 self.rsa_E = [0] * 256 self.rsa_N = [0] * 256 self.rsa_buff = [0] * 256 self.byte_counter = 0