We have upgraded the community system as part of the upgrade a password reset is required for all users before login in.

CRC generation

  • Hi all

    I need to be able to generate CRC's quickly, I know a lot of IOT type processors have hardware CRC engines, is there anything like that available on the Omega, at the moment I'm using crcmod in python and its astonishingly slow, I have an 8MHz 8-bit PIC producing CRCs at at least 10x the rate! I guess I'm learning about python quickly!


  • @ecooper Have you already tried the installed OpenWrt crc modules/packages?

    # Omega2+ FW v0.3.2 b239
    opkg update
    root@Omega-5BE1:/# opkg list-installed | grep -i crc
    kmod-crypto-crc32c - 4.14.81-1
    kmod-lib-crc-ccitt - 4.14.81-1
    kmod-lib-crc16 - 4.14.81-1
    root@Omega-5BE1:/# lsmod | grep -i crc
    crc_ccitt               1035  1 ppp_async
    crc16                   1031  2 bluetooth,ext4
    crc32c_generic          1424  1 
    crypto_hash             9874  6 bluetooth,cmac,ext4,jbd2,crypto_null,crc32c_generic

    Or: enable/uncomment the fifth (5th) line of the '/etc/opkg/distfeeds.conf' file.

    # Omega2+ Fw v0.3.2 b239
    root@Omega-5BE1:/# opkg update
    Downloading http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/packages/Packages.gz
    Updated list of available packages in /var/opkg-lists/openwrt_packages
    Downloading http://downloads.openwrt.org/releases/18.06-SNAPSHOT/packages/mipsel_24kc/packages/Packages.sig
    Signature check passed.
    root@Omega-5BE1:/# opkg list | grep -i crc
    crconf - pre2-1 - Linux crypto layer configuraton tool. Use this to manipulate kernel Crypto API/framework stuff, like drivers, templates, etc. Example: https://wiki.strongswan.org/projects/strongswan/wiki/Pcrypt Most interesting stuff you can find on https://wiki.strongswan.org
    kmod-crypto-crc32c - 4.14.81-1 - CRC32c CRC module
    kmod-lib-crc-ccitt - 4.14.81-1 - Kernel module for CRC-CCITT support
    kmod-lib-crc16 - 4.14.81-1 - Kernel module for CRC16 support
    libgcrypt - 1.6.6-3 - This is a general purpose cryptographic library based on the code from GnuPG. It provides functions for all cryptograhic building blocks: symmetric ciphers (AES, DES, Arcfour, CAST5), hash algorithms (MD5, SHA-1, RIPE-MD160, SHA-224/256, SHA-384/512), MACs (HMAC for all hash algorithms), public key algorithms (RSA, DSA), large integer functions, random numbers and a lot of supporting functions. Some algorithms have been disabled to reduce size (Blowfish, Twofish, Serpent, RC2, SEED, Camellia, CRC, MD4, TIGER-192, Whirlpool, ElGamal, ECC).
    python-crcmod - 1.7-1 - The software in this package is a Python module for generating objects that compute the Cyclic Redundancy Check (CRC). There is no attempt in this package to explain how the CRC works. There are a number of resources on the web that give a good explanation of the algorithms. Just do a Google search for "crc calculation" and browse till you find what you need. Another resource can be found in chapter 20 of the book "Numerical Recipes in C" by Press et. al.

  • @ecooper MTD makes use of CRC so that may be a good starting point for you if you're using C.

Log in to reply

Looks like your connection to Community was lost, please wait while we try to reconnect.