- table.info('Diffie-Hellman group',
- '%s (%d-bit order, %d-bit elements)' %
- (crypto['kx-group'],
- int(crypto['kx-group-order-bits']),
- int(crypto['kx-group-elt-bits'])),
- len = 32)
- table.info('Data encryption',
- '%s (%d-bit key; %s)' %
- (crypto['cipher'],
- int(crypto['cipher-keysz']) * 8,
- crypto['cipher-blksz'] == '0'
- and 'stream cipher'
- or '%d-bit block' % (int(crypto['cipher-blksz']) * 8)),
- newlinep = True)
- table.info('Message authentication',
- '%s (%d-bit key; %d-bit tag)' %
- (crypto['mac'],
- int(crypto['mac-keysz']) * 8,
- int(crypto['mac-tagsz']) * 8),
- newlinep = True)
- table.info('Hash function',
- '%s (%d-bit output)' %
- (crypto['hash'],
- int(crypto['hash-sz']) * 8),
- newlinep = True)
+ firstp = True
+ for label, format in cryptolayout:
+ table.info(label, format_stat(format, crypto),
+ len = 42, newlinep = not firstp)
+ firstp = False