lopy4/components/hash-sigs-master/lm_common.c
/*
 * The amount of space we use for signature
 */
The amount of space we use for signature
The amount of space we use for signature
size_t lm_get_signature_len(param_set_t lm_type,
                            param_set_t lm_ots_type) {
    unsigned n, height;
    if (!lm_look_up_parameter_set( lm_type, 0, &n, &height ))
        return 0;
    int ots_sig_len = lm_ots_get_signature_len(lm_ots_type);
    if (ots_sig_len == 0)
        return 0;
    return 4 + 4 + ots_sig_len + n*height;
}
size_t lm_get_signature_len ( param_set_t lm_type , param_set_t lm_ots_type ) { unsigned n , height ; if ( ! lm_look_up_parameter_set ( lm_type , 0 , & n , & height ) ) return 0 ; int ots_sig_len = lm_ots_get_signature_len ( lm_ots_type ) ; if ( ots_sig_len == 0 ) return 0 ; return 4 + 4 + ots_sig_len + n * height ; }
The amount of space we use for signature
The amount of space we use for signature
/*
     * The LM signature consists of the type code, the diversification factor,
     * the LM-OTS signature (which includes the OTS type code), and the
     * authentication path (which is an array of height hashes)
     */