This weakness involves creating non-standard or non-tested algorithms, using weak algorithms or applying cryptographic algorithms incorrectly. Algorithms that were once considered safe are commonly later found to be unsafe, as the algorithms were broken.
The crypt functions use a poor one-way hashing algorithm; since they only accept passwords of 8 characters or fewer and only a two-byte salt, they are excessively vulnerable to dictionary attacks given today's faster computing equipment.
aqbanking-5.5.1/src/plugins/backends/aqhbci/plugin/msglayer/msgcrypt_rdh2.c
The highlighted line of code below is the trigger point of this particular Fedora 23 crypto weakness.
/* create date */
if (!strftime(sdate, sizeof(sdate),
"%Y%m%d", lt)) {
DBG_INFO(AQHBCI_LOGDOMAIN, "Date string too long");
return GWEN_ERROR_INTERNAL;
}
/* create time */
if (!strftime(stime, sizeof(stime),
"%H%M%S", lt)) {
DBG_INFO(AQHBCI_LOGDOMAIN, "Date string too long");
return GWEN_ERROR_INTERNAL;
}
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"SecDetails/dir", 1);
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"SecStamp/date", sdate);
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"SecStamp/time", stime);
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"key/bankcode",
AB_User_GetBankCode(u));
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"key/userid",
crypt?peerId:userId);
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"key/keytype",
crypt?"V":"S");
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"key/keynum",
GWEN_Crypt_Token_KeyInfo_GetKeyNumber(ki));
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"key/keyversion",
GWEN_Crypt_Token_KeyInfo_GetKeyVersion(ki));
GWEN_DB_SetCharValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"secProfile/code",
"RDH");
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT,
"secProfile/version",
AH_User_GetRdhType(u));
if (crypt) {
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "function", 4); /* crypt */
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "cryptAlgo/algo", 13); /* 2-KEY-TRIPLE-DES */
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "cryptAlgo/mode", 2); /* CBC (0-Padding) */
}
else {
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "function", 2); /* sign with signature key */
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "signAlgo/algo", 10); /* RSA */
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "signAlgo/mode", 17); /* ISO-9796-2 */
GWEN_DB_SetIntValue(cfg, GWEN_DB_FLAGS_DEFAULT, "hashAlgo/algo", 999); /* RMD160 */