You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/18 15:09:36 UTC

[GitHub] [incubator-nuttx-apps] anjiahao1 opened a new pull request, #1361: Tinycrypto

anjiahao1 opened a new pull request, #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361

   ## Summary
   add tinycrypt to crypto
   and then inside of mucboot internal used lib
   ## Impact
   mcuboot
   ## Testing
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#discussion_r999560442


##########
crypto/tinycrypt/.gitignore:
##########
@@ -0,0 +1,2 @@
+*.zip
+tinycrypt/*

Review Comment:
   ```suggestion
   tinycrypt/*
   
   ```



##########
crypto/tinycrypt/Make.defs:
##########
@@ -0,0 +1,25 @@
+############################################################################
+# apps/crypto/tinycrypt/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifneq ($(CONFIG_TINYCRYPT),)
+CONFIGURED_APPS += $(APPDIR)/crypto/tinycrypt
+CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include}
+CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include}
+endif

Review Comment:
   please address



##########
boot/mcuboot/Makefile:
##########
@@ -71,6 +71,8 @@ CSRCS += $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/aes_encrypt.c \
          $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/ecc_dh.c \
          $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/sha256.c \
          $(MCUBOOT_UNPACK)/ext/tinycrypt/lib/source/utils.c
+CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/ext/tinycrypt/lib/include}

Review Comment:
   ```suggestion
   
   CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/boot/mcuboot/mcuboot/ext/tinycrypt/lib/include}
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] gustavonihei commented on pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#issuecomment-1283093100

   > @gustavonihei could you take a look? This patch replace mcuboot private copy to the official tinycrypto.
   
   MCUboot uses a modified version of tinycrypt, so it cannot be easily substituted.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#issuecomment-1282627901

   @gustavonihei could you take a look? This patch replace mcuboot private copy to the official tinycrypto.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] gustavonihei commented on a diff in pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on code in PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#discussion_r999526723


##########
crypto/tinycrypt/Makefile:
##########
@@ -0,0 +1,89 @@
+############################################################################
+# apps/crypto/tinycrypt/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+TINYCRYPT_URL ?= "https://github.com/intel/tinycrypt.git"
+
+TINYCRYPT_UNPACK = tinycrypt
+$(TINYCRYPT_UNPACK):
+	$(Q) echo "git clone $(TINYCRYPT_URL)"
+	$(Q) git clone $(TINYCRYPT_URL)
+
+CFLAG +=-I$(TINYCRYPT_UNPACK)

Review Comment:
   ```suggestion
   CFLAGS +=-I$(TINYCRYPT_UNPACK)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] gustavonihei commented on a diff in pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on code in PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#discussion_r999526723


##########
crypto/tinycrypt/Makefile:
##########
@@ -0,0 +1,89 @@
+############################################################################
+# apps/crypto/tinycrypt/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+TINYCRYPT_URL ?= "https://github.com/intel/tinycrypt.git"
+
+TINYCRYPT_UNPACK = tinycrypt
+$(TINYCRYPT_UNPACK):
+	$(Q) echo "git clone $(TINYCRYPT_URL)"
+	$(Q) git clone $(TINYCRYPT_URL)
+
+CFLAG +=-I$(TINYCRYPT_UNPACK)

Review Comment:
   ```suggestion
   CFLAGS +=-I$(TINYCRYPT_UNPACK)
   ```
   I believe this intends to append to the global `CFLAGS` variable instead of creating a new `CFLAG`, right?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] gustavonihei commented on pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
gustavonihei commented on PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#issuecomment-1284154930

   I believe the addition of `tinycrypto` requires some new information to be added to [Export Restrictions](https://github.com/apache/incubator-nuttx-apps#export-restrictions) section of the documentation.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#discussion_r998651080


##########
crypto/tinycrypt/Makefile:
##########
@@ -0,0 +1,89 @@
+############################################################################
+# apps/crypto/tinycrypt/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+TINYCRYPT_URL ?= "https://github.com/intel/tinycrypt.git"

Review Comment:
   Why not download a tagged version and untar instead of cloning a master?



##########
crypto/tinycrypt/Make.defs:
##########
@@ -0,0 +1,25 @@
+############################################################################
+# apps/crypto/tinycrypt/Make.defs
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+ifneq ($(CONFIG_TINYCRYPT),)
+CONFIGURED_APPS += $(APPDIR)/crypto/tinycrypt
+CFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include}
+CXXFLAGS += ${shell $(INCDIR) $(INCDIROPT) "$(CC)" $(APPDIR)/crypto/tinycrypt/tinycrypt/lib/include}
+endif

Review Comment:
   ```suggestion
   endif
   
   ```



##########
crypto/tinycrypt/Makefile:
##########
@@ -0,0 +1,89 @@
+############################################################################
+# apps/crypto/tinycrypt/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+TINYCRYPT_URL ?= "https://github.com/intel/tinycrypt.git"
+
+TINYCRYPT_UNPACK = tinycrypt
+$(TINYCRYPT_UNPACK):
+	$(Q) echo "git clone $(TINYCRYPT_URL)"
+	$(Q) git clone $(TINYCRYPT_URL)
+
+CFLAG +=-I$(TINYCRYPT_UNPACK)

Review Comment:
   ```suggestion
   CFLAG += -I$(TINYCRYPT_UNPACK)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on pull request #1361: add tinycrypt to crypto

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on PR #1361:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1361#issuecomment-1284054281

   > > @gustavonihei could you take a look? This patch replace mcuboot private copy to the official tinycrypto.
   > 
   > MCUboot uses a modified version of tinycrypt, so using the vanilla version from intel's repository may be not be a trivial effort.
   
   Ok, @anjiahao1 let's keep MCUboot use the private tinycrypto version, and only move tinycrypto search path from Make.defs to Makefile.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org