Microchip
直播中

叶亮

7年用户 225经验值
私信 关注
[问答]

web_net_server_nvm_mpfs演示中的错误

我使用的是和声V2.05、XC32 1.44和MPLAB X 4.05,带有Microchip启动器套件、PIC32 MZ(EF)和密码。我可以在没有HTTP和HTTPS版本的HW加速器的情况下编译和执行和声演示(WebSythNETServer NVMMMPFS)。在该演示中使用了WOLFSSL第三方库。当我在MHC中选择HW加速器(2个位置)并运行HTTPS服务器时,程序运行5-10秒,然后挂起。来自Firefox的消息显示“执行TLS握手到192.168100.115…”。这个bug最有可能的地方是WOLFSSL库,以及它是如何与硬件加密进行交互的。我已经询问WOLFSSL帮助找到这个bug,如果他们发现了什么,我会在这里发布他们的发现。还有其他的可能性——bug可能是和谐的,或者是HW加速器本身。所有这些可能性对于我来说都是非常困难的,因为我不知道在框架中去哪里——可能在表示层,但是在哪里?由于在演示示例中存在错误,也许Microchip可以找到bug。我已经联系了WOLSL,并且他们在这个问题上提供了极好的支持。稍后我会在这个帖子上重新发布回复。

以上来自于百度翻译


      以下为原文

    I am using HARMony v2.05, XC32 1.44 and MPLAB X 4.05 with a Microchip starter kit, PIC32MZ (EF) with Crypto.

I can compile and execute the Harmony demo (web_net_server_nvm_mpfs) without the HW accelerator for both the http and https versions. The wolfSSL third party library is used in that demo. When I select the HW accelerator in MHC (2 places) and run the https server, the program runs for 5-10 sec and then hangs. A message from Firefox shows “Performing a TLS handshake to 192.168.100.115…”.

The most likely place for this bug is the wolfSSL library and how it interacts with the hardware crypto. I have asked wolfSSL for help finding this bug and I will post their findings here if they find something.

There are other possibilities -- the bug could be in Harmony or in the HW accelerator itself. All of these possibilities are extremely difficult for me to debug because I have no idea where to look in the framework -- probably in the presentation layer, but where? Since the error exists in the demo example, maybe Microchip could find the bug.

I have contacted wolSSL and they have provided excellent support on this issue.  I will repost the responses later on this thread.

回帖(3)

王雪

2018-10-16 13:02:01
注意:我在发布原始WOLFSSL响应时遇到了一些问题,所以我必须把它张贴在步骤中,并在必要的时候编辑以通过论坛过滤器。嗨,比尔,很高兴见到你!我是在PIC32 MZ支持下工作的最新工程师。结果表明,该芯片上的哈希功能存在几个硬件问题。一个问题是不能执行单个块哈希并获得中间摘要,因此硬件必须执行更新-gt;更新-gt;最终,它不能与另一个操作重叠。我与Microchip和他们的加密IP提供者紧密合作来识别和尝试解决这个问题。如果你查看数据表的第5页(http://WW1.Microchip .com……ViceDoc/800万58k.pdf),他们就为它添加了一个勘误表:*密码引擎部分包:勘误表64:密码引擎没有。T支持部分包处理。*密码引擎:零长度包:ErrATA 65:零长度包无法处理,因为密码引擎不支持空字符串哈希。如果需要进一步的细节或有任何其他问题,请让我知道。谢谢,David Garske,WOLFSSL
WOLFSLS-EMAIL2.TXT(3.41 KB)-下载58次

以上来自于百度翻译


      以下为原文

    Note:  I am having problems reposting the original wolfSSL response, so I will have to post it in steps and edit as necessary to get past the forum filters.
 
Hi Bill,Its excellent to meet you! I'm the latest engineer who worked on the PIC32MZ support. It turned out there were several hardware issues with the hashing functionality on that chip. One issue was you could not perform a single block hash and get the intermediate digest, so the hardware has to perform the update->update->final and it cannot overlap with another operation. I worked closely with Microchip and the their crypto IP provider to identify and try and workaround the issue. 
 
If you look at page 5 of the datasheet (http://ww1.microchip.com/...viceDoc/80000588K.pdf) they have added errata for it:
* Crypto Engine Partial Packet: Errata 64: The Crypto engine does not support partial packet processing.
* Crypto Engine: Zero Length Packet: Errata 65: Zero length packet fails to process as the Crypto engine does not support an empty string hash.
 
Let me know if you need any further details or have any other questions. Thanks,
David Garske, wolfSSL
   Attachment(s)

wolfSSL_email1.txt (1.93 KB) - downloaded 53 times
wolfssl-email2.txt (3.41 KB) - downloaded 58 times
举报

梁若莲

2018-10-16 13:16:08
YKES,好的PIC32 MZ…DA机载密码是BGGY。有没有人知道如果HORAND支持Microchip ATEC508A密码芯片(WOLFSSL)?此外,是否有一个开发板,用于插入到D3310-C开发板的TeaCeC508A?谢谢!

以上来自于百度翻译


      以下为原文

    Yikes, OK the PIC32MZ..DA onboard crypto is buggy.
Does anyone know offhand if Harmony supports the Microchip ATECC508A crypto chip (WolfSSL does)?
Also, is there a development board for the ATECC508A that plugs into the DM320010-C development board?
Thanks!
举报

陈亮

2018-10-16 13:34:54
嗨,比尔,我们找到并修复了一个与PIC32 MZ和AES CBC的WOLFSSL错误。该问题于2018年4月4日在PR 1479(HTTPS://Github. COM/WOLFSLS/WOLFSL/PULL/1479)中确定,并将在WOLFSSL V3.150版本中发布。我们还与Microchip合作,确保修补程序在下一个和声版本中。提交注意:当加密/解密被多次调用时,它修复了PIC32 MZ硬件加速的AES-CBC IV。它还为用例添加了一个测试。谢谢,David Garske,WOLFSSL

以上来自于百度翻译


      以下为原文

    Hi Bill,
 
We did find and fix a wolfSSL bug with the PIC32MZ and AES CBC. The issue is fixed on April 4, 2018 in PR 1479 ( https://github.com/wolfSSL/wolfssl/pull/1479) and will be in the wolfSSL v3.15.0 release. We also worked with Microchip to make sure the patch is in the next Harmony release.
 
Commit Notes:
This fixes updating the AES-CBC IV for PIC32MZ hardware acceleration when encrypt/decrypt is called multiple times in a row. It also adds a test for the use case.
 
Thanks, David Garske, wolfSSL
举报

更多回帖

发帖
×
20
完善资料,
赚取积分