Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1387251rwb; Fri, 23 Sep 2022 11:55:27 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6HMg4nIUQDgc9Um4qdXO+BpJz98urOjKNILXr0k26//AnQrAvDyIvoYEYAKeOUj7EF6k2Z X-Received: by 2002:a17:90a:2a81:b0:205:9927:bcf7 with SMTP id j1-20020a17090a2a8100b002059927bcf7mr1060823pjd.189.1663959326724; Fri, 23 Sep 2022 11:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663959326; cv=none; d=google.com; s=arc-20160816; b=PLoBxJgLzUig4E4+tSByjjX6L4Qfuuvcc/Rg0Bz0O52kpgc9WNBKl4jawrX5+F/TSl Amj1EYJw1i1myrzxBIlmH/hNBJplQki50B0q+d9xtQiDzbiuupeTwPC0Usz49CCy8ASj Ug4KXtm4RNxmOSRCVcMX9eN7LSJFX4IasyHDNuRH8dJ3mobTHugxTRx27f/hf51q6cO5 BBbvAazviMpc5jTkGvl2peNAdjWAXbosG5WXBZkp1C30kxFmUhKZvD/yCC9W5C/+zxqd av0/1ZyKHS3yYkR0jAZ5bL66AM0tddqCcLzh+DNFTDNux9R2wwgeTYmG0/rVFvjlwA7e mdow== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=7t6V8MWLRtUrTvu+MoIbCnjiI/X4WEGD3aHIxGZW2yA=; b=TRrTWgJYwQwu2Z9vUPvbndsmu9A6qaFDxOfiM6HQ/ank6xfLAb5SoQosUnkEy3147Z 08Gj+QPacyPNJyjFcqz34QXucLV3YBlccHnbMzJlnygotofcigpua9tCEAxx2BaplGbt ZDTcltbgtOjUDWa/4Xz+6XRFtMdF6bLoeRqKRhGjy1HCPdy+JwQ+T5qYJPIpeZFnybu5 mKP4yfGYHpiseG5SuOT6g/z2ilS+urBOEpBlTZtSfN3bd6iITwawtUOkNQlPYI3ukEq3 ZzeXSZZ4ejg+k8zUy04WFMc1DkEgmL7qtwwE7ttLehc7TbveSB6gTAk/hmwZIcvarOZz b2qg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=PQRyfmga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d8-20020aa78e48000000b00557863a7d1csi1193432pfr.110.2022.09.23.11.55.14; Fri, 23 Sep 2022 11:55:26 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20210112 header.b=PQRyfmga; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232098AbiIWSM5 (ORCPT + 99 others); Fri, 23 Sep 2022 14:12:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231527AbiIWSMz (ORCPT ); Fri, 23 Sep 2022 14:12:55 -0400 Received: from mail-vs1-xe2e.google.com (mail-vs1-xe2e.google.com [IPv6:2607:f8b0:4864:20::e2e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CEA3EE64C for ; Fri, 23 Sep 2022 11:12:54 -0700 (PDT) Received: by mail-vs1-xe2e.google.com with SMTP id q26so760302vsr.7 for ; Fri, 23 Sep 2022 11:12:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date; bh=7t6V8MWLRtUrTvu+MoIbCnjiI/X4WEGD3aHIxGZW2yA=; b=PQRyfmgaolbiYniSRKRyPZi4Elih62nuDEKXwXyjPtGLW3tx9GzmDbmqpLrVb0cipO KaK0fgca2P0sl9fyfgP7IbPxvfrX2DIOmqV+8Y4ut5fJQNEGEDRg+Xz4tiPdUTR5WDWJ Z1LrctFgO3ffQziTPoOmZjEzbrD573/5f8I5NlFWuB0TMlya2n/FQJr4fq+FtRtQnpxB i35ObhVFZcvWf6M1NtzB8+wHkfnhGKonv2bfbyfOnNjg3y201TEbCZqb987KGBeeWt1j L1UsNEdU/azcrk5n5A77BUJmQnrbRA9o2MkAj79KIa0GXmiJYo+lPC2wMmv2B0krtHJh UumA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date; bh=7t6V8MWLRtUrTvu+MoIbCnjiI/X4WEGD3aHIxGZW2yA=; b=5hBrmuggDDvx7EMN4vSRomfSiqnDDybpEZCSPJ7lwfb4WIsHBJzFo8eZSlisCvGZwq LSVDqLLAJcrhUQsZWopgOFgF8SmCDfmzU7QsWi27g5qGXi2ejUdj9a9di6LhkaCOEslA dnrTd4OAsaYJ4QGlAs4Au9ZMfCKgOptPJloGaJAQk+nrtsyp/7sfyC2TdQo9r1cvhwnj 2ii/XdAHsfFh8MS97Q8ZumFjhWJc5s8OaTptkj2LYHw+8vjglCyLHv3ntiqmE1tNjwQN RzPAPgKBlQ3hJNG/wHt51jcDZyr/3gKzohU/2fYnrHPBuTN45YJ2X516RxGaQ5q3Phe+ tCTA== X-Gm-Message-State: ACrzQf06rgjSGMgKXQjSngvdvEZBk+wF3qf92tVb4urJlX9kOhi6V+b2 YOMCFSAdrrnQa8uJidbCFppGPRoQ3AVmJkddcN6QYmd5xH4= X-Received: by 2002:a67:ea0b:0:b0:391:7da:9d76 with SMTP id g11-20020a67ea0b000000b0039107da9d76mr4105764vso.84.1663956773490; Fri, 23 Sep 2022 11:12:53 -0700 (PDT) MIME-Version: 1.0 References: <20220923110332.24090-1-unixbhaskar@gmail.com> In-Reply-To: <20220923110332.24090-1-unixbhaskar@gmail.com> From: Daniel Mentz Date: Fri, 23 Sep 2022 11:12:42 -0700 Message-ID: Subject: Re: [PATCH] kernel:gen_kheaders:Replace md5sum to sha256sum To: Bhaskar Chowdhury Cc: masahiroy@kernel.org, lkml Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-17.6 required=5.0 tests=BAYES_00,DKIMWL_WL_MED, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, USER_IN_DEF_DKIM_WL,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Sep 23, 2022 at 4:06 AM Bhaskar Chowdhury wrote: > Thought to apply a better encryption mechanism. MD5 and SHA256 are secure (or, in the case of MD5, not so secure) hash algorithms, not encryption mechanisms. > Replace all occurance of md5sum to sha256sum . Looking at this script, I'm not convinced that it relies on MD5 being a cryptophically secure hash function. It appears to me as if this script uses MD5 to simply detect innocent changes to a set of files as opposed to guarding against malicious attacks. I also found that sha256sum takes almost three times longer than md5sum. So, in the absence of security requirements, md5sum might actually be the better choice because it's faster.