def rpad_bytes_crypto(b, block_size=16):
    """
    Return special right-padded version of bytes with length as multiple of block size.
    Padding is ALWAYS applied even if already block size multiple.
    Padding is single byte repeated indicating number of padding bytes 
    (0x01 - 0x10 for block size 16).
    Based on recommendation from RFC 3852, PKCS #5, PKCS #7.
    """
    if block_size > 255:
        raise ValueError('Block size {0} too large (>255)'.format(block_size))
    padcnt = block_size - len(b) % block_size
    pad_byte = bytes([padcnt])
    return b + pad_byte * padcnt
