From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id ACC34C43381 for ; Tue, 26 Mar 2019 19:23:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 7DC1A20823 for ; Tue, 26 Mar 2019 19:23:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=networkplumber-org.20150623.gappssmtp.com header.i=@networkplumber-org.20150623.gappssmtp.com header.b="wbW7acrT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731816AbfCZTXo (ORCPT ); Tue, 26 Mar 2019 15:23:44 -0400 Received: from mail-pg1-f172.google.com ([209.85.215.172]:45277 "EHLO mail-pg1-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726266AbfCZTXo (ORCPT ); Tue, 26 Mar 2019 15:23:44 -0400 Received: by mail-pg1-f172.google.com with SMTP id y3so8701186pgk.12 for ; Tue, 26 Mar 2019 12:23:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pTr/xkIfmRBwF5ZSzJS1LRsw4IJs6rihfOo4D2raoiQ=; b=wbW7acrTqL5xo9NO+U8+kjx7xBhYI7UwADkmOt9CLvdCWFVUolRbpxc2czucC5zZUC xQCWD5uXeh4GblfJZjFUSS4VK493Q/tkNgcVdo8O9VX2sdF3BS0Lzrwz4eb7QXLu/IZH 1AWMcSnO9+cDJVB34EZ99rSbvioCmMZtiK6aNddmyMkCPq7UFaQWdGiUDwiScnWceGGE Tj9onzjDyNQ1Iuz51h9HREMNZaoZcI6Ye/gaI5eoN1ALCyXeCAATclQMLh0qg7hhlACI IM3mt1ao/4s7oX5HWUWqNfLkJV6kvsQOTvyhIpjdtxvm2eEIr07Majua1debXgh4M707 nw9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=pTr/xkIfmRBwF5ZSzJS1LRsw4IJs6rihfOo4D2raoiQ=; b=c4h85Nvy/5wU3Dek9AhSLZwvYIO0HjE7PF9dxcfKI0UmU/XRGToWZboezlmsyxov1z vWZKWOlWAwsXYmuNKSS6RNorkGO1HOjAANYf8ZtyQFDmqa8QYti9v/YEVvFDZHliZ6fR jDTWMUEt3hXLNs+MecSf9Eu1gHVdRYUu9EiGtYRkARp5aiFpIW0swxk6Z6ox0w2jMWZS OZ6Ar6LkyqnovZA/EvoTmrv1eSH/oFYBo9cqKpLFf1Gt1LUsxWeTmDwxlT+fXyH8n7QW J4plpfLe0nUNpVQvB2CzlBqX1iRyMJXKyY29jnAUqv8oE6TZGhQoq3Uf6xuSLRPSbtoS vM+g== X-Gm-Message-State: APjAAAXgv0Q2nDQ3d94z5ybWx8GjviNDAN8L+e5UULLDYeqLyRZ7CNpE iRHz3Uv9rUJtDbaPdacR2QxaXQ== X-Google-Smtp-Source: APXvYqyqE6xUJCyy6nNYTluMrzqeMlYLWe7z9dmnOYjlXdLkbsU1zxSyngDW1K/l5d5LF49HI3ICUA== X-Received: by 2002:a63:1322:: with SMTP id i34mr30002205pgl.208.1553628223621; Tue, 26 Mar 2019 12:23:43 -0700 (PDT) Received: from shemminger-XPS-13-9360 (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id h13sm25773197pfn.114.2019.03.26.12.23.43 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 26 Mar 2019 12:23:43 -0700 (PDT) Date: Tue, 26 Mar 2019 12:23:40 -0700 From: Stephen Hemminger To: George Spelvin Cc: daniel@iogearbox.net, hannes@stressinduktion.org, netdev@vger.kernel.org Subject: Re: Revising prandom_32 generator Message-ID: <20190326122340.6aa297b5@shemminger-XPS-13-9360> In-Reply-To: <201903261907.x2QJ7148017418@sdf.org> References: <201903261110.x2QBAFmp001613@sdf.org> <201903261117.x2QBHTnl002697@sdf.org> <109c67e3-7cda-40cf-80e1-a2d3500a2b5d@www.fastmail.com> <201903261907.x2QJ7148017418@sdf.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On Tue, 26 Mar 2019 19:07:01 GMT George Spelvin wrote: > lfsr113 is indeed trivial to predict. It's a 113-bit LFSR defined > by a degree-113 polynomial. (The implementation as four separate > polynomials of degree 31, 29, 28 and 25 doesn't change this.) Given > any 113 bits of its output (not necessarily consecutive), that's > 113 boolean linear equations in 113 unknowns to find the internal > state. > > I don't have PoC code, but Gaussian elimination is not exactly > rocket science. If some code is using existing lfsr in a manner where prediction would be a problem, then it is probably using the PRNG incorrectly and should be using a cryptographic RNG.