This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] DK-TM4C129X:如何使用 TM4C129x 打印每轮 CBC 单 DES 加密/解密?

Guru**** 657500 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/arm-based-microcontrollers-group/arm-based-microcontrollers/f/arm-based-microcontrollers-forum/1167033/dk-tm4c129x-how-to-print-each-rounds-of-the-cbc-single-des-encrypt-decrypt-using-tm4c129x

器件型号:DK-TM4C129X

大家好、团队、

我代表我的客户发布:

大家好、我知道我们必须使用 DESConfigSet (DES_BASE、DES_CFG_DIR_encryption | DES_CFG_MODE_CBC | DES_CFG_SINGLE)来设置 DES 模块的加密过程、 并使用 DESDataProcess (DES_BASE、EnDESPlainText、DenciText、64)直接获取密码文本。 我的问题是、是否有办法检查在每一轮 DES 函数之后打印出来的内容?  

此致、

Renan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Renan、您好!

    我并不完全确定"DES 函数的每一轮"是什么意思、但最终结果将在  DESCipherText 数组内。

    TivaWare 中的函数说明概括了第三个输入是将被处理数据放置在其中的字阵列的指针。

    //*****************************************************************************
    //
    //! Processes blocks of data through the DES module.
    //!
    //! \param ui32Base is the base address of the DES module.
    //! \param pui32Src is a pointer to an array of words that contains the
    //! source data for processing.
    //! \param pui32Dest is a pointer to an array of words consisting of the
    //! processed data.
    //! \param ui32Length is the length of the cryptographic data in bytes.
    //! It must be a multiple of eight.
    //!
    //! This function takes the data contained in the pui32Src array and processes
    //! it using the DES engine.  The resulting data is stored in the
    //! pui32Dest array.  The function blocks until all of the data has been
    //! processed.  If processing is successful, the function returns true.
    //!
    //! \note This functions assumes that the DES module has been configured,
    //! and initialization values and keys have been written.
    //!
    //! \return true or false.
    //
    //*****************************************************************************
    bool
    DESDataProcess(uint32_t ui32Base, uint32_t *pui32Src, uint32_t *pui32Dest,
                   uint32_t ui32Length)

    此致、

    Ralph Jacobi

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    您好 Ralph、

    感谢您的回复。请在下面查看我的客户反馈:

    当我提到 DES 周期时、我指的是16轮 DES 流程。 DESDataProcess()仅在完成16轮后输出数组。 我想问的是、你如何在一轮后检查输出?

    此致、

    Renan

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    Renan、您好!

    使用硬件加速 DES 外设无法实现这一目的。 他们需要实施 DES 加密的软件版本以检查16轮之间的数据。

    此致、

    Ralph Jacobi