func calculateGroupParamLengths(maxPLen uint32, securityLevel uint32) (uint32, uint32, error) {
	pLen := uint32(0)
	qLen := uint32(0)

	if securityLevel < 80 {
		return 0, 0, errors.New("Security level must be at least 80 bits")
	} else if securityLevel == 80 {
		pLen = 1024
		qLen = 256
	} else if securityLevel <= 112 {
		pLen = 2048
		qLen = 256
	} else if securityLevel <= 128 {
		pLen = 3072
		qLen = 320
	} else {
		return 0, 0, errors.New("Security level not supported")
	}
	if pLen > maxPLen {
		return 0, 0, errors.New("Modulus size is too small for this security level")
	}
	return pLen, qLen, nil
}
// calculateGroupParamLengths will calculate the group parameter sizes
// based on a security level. Returns pLen, qLen
calculateGroupParamLengths will calculate the group parameter sizes
based on a security level. Returns pLen, qLen
// calculateGroupParamLengths will calculate the group parameter sizes // based on a security level . Returns pLen qLen
func calculateGroupParamLengths(maxPLen uint32, securityLevel uint32) (uint32, uint32, error) {
	pLen := uint32(0)
	qLen := uint32(0)
	if securityLevel < 80 {
		return 0, 0, errors.New("Security level must be at least 80 bits")
	} else if securityLevel == 80 {
		pLen = 1024
		qLen = 256
	} else if securityLevel <= 112 {
		pLen = 2048
		qLen = 256
	} else if securityLevel <= 128 {
		pLen = 3072
		qLen = 320
	} else {
		return 0, 0, errors.New("Security level not supported")
	}
	if pLen > maxPLen {
		return 0, 0, errors.New("Modulus size is too small for this security level")
	}
	return pLen, qLen, nil
}
func calculateGroupParamLengths ( maxPLen uint32 , securityLevel uint32 ) ( uint32 , uint32 , error ) { pLen := uint32 ( 0 ) qLen := uint32 ( 0 ) if securityLevel < 80 { return 0 , 0 , errors . New ( " " ) } else if securityLevel == 80 { pLen = 1024 qLen = 256 } else if securityLevel <= 112 { pLen = 2048 qLen = 256 } else if securityLevel <= 128 { pLen = 3072 qLen = 320 } else { return 0 , 0 , errors . New ( " " ) } if pLen > maxPLen { return 0 , 0 , errors . New ( " " ) } return pLen , qLen , nil }
calculateGroupParamLengths will calculate the group parameter sizes
based on a security level.
calculateGroupParamLengths will calculate the group parameter sizes based on a security level .