alpine 3.8
crypto weakness #597

4

Weakness Breakdown


Definition:

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.

Warning code(s):

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.

File Name:

innoextract/src/innoextract-1.7/src/crypto/arc4.hpp

Context:

The highlighted line of code below is the trigger point of this particular Alpine 3.8 crypto weakness.

  * \file
 *
 * Alledged RC4 en-/decryption routines.
 */
#ifndef INNOEXTRACT_CRYPTO_ARC4_HPP
#define INNOEXTRACT_CRYPTO_ARC4_HPP

#include <stddef.h>

#include <boost/cstdint.hpp>

#include "configure.hpp"

#if INNOEXTRACT_HAVE_ARC4

namespace crypto {

//! Alledged RC4 en-/decryption calculation
struct arc4 {
	
	void init(const char * key, size_t length);
	
	void discard(size_t length);
	
	void crypt(const char * in, char * out, size_t length);
	
private:
	
	void update();
	
	boost::uint8_t state[256];
	size_t a, b;
	
};

} // namespace crypto

#endif // INNOEXTRACT_HAVE_ARC4

#endif // INNOEXTRACT_CRYPTO_ARC4_HPP
 

The registered trademark Linux® is used pursuant to a sublicense from the Linux Foundation, the exclusive licensee of Linus Torvalds, owner of the mark on a world­wide basis.