Systems and methods for efficient computation of univariate statistical moments. An example method comprises: receiving a plurality of input traces, wherein each trace of the plurality of input traces includes a plurality of sample points; appending, to a trace matrix comprising combinations of pre-determined degrees of the sample points, a plurality of rows representing the plurality of input traces; appending, to a classifier matrix, a plurality of columns representing metadata associated with the plurality of input traces; applying a defined transformation to the classifier matrix to produce a transformed classifier matrix; incrementing an accumulator matrix by a product of the transformed classifier matrix and the trace matrix; computing, using a first subset of elements of the accumulator matrix, a first statistical moment for a first portion of the input traces identified by a first subset of elements of the classifier matrix, wherein the first subset of elements of the classifier matrix is identified by a first classifier value; and computing, by subtracting each element of the first subset of elements of the accumulator matrix from a corresponding sum of elements of the input traces stored by the accumulator matrix, a second statistical moment for a second portion of the input traces identified by a second subset of elements of the classifier matrix, wherein the second subset of elements of the classifier matrix is identified by a second classifier value.
展开▼