SearcharxivSearch

arXiv subjects

Sourav Sen Gupta

Publications and source records attributed to Sourav Sen Gupta.

4 recordsLinked to original sources

Towards Safer Smart Contracts: A Sequence Learning Approach to Detecting Security Threats

Symbolic analysis of security exploits in smart contracts has demonstrated to be valuable for analyzing predefined vulnerability properties. While some symbolic tools perform complex analysis steps, they require a predetermined invocation depth to search vulnerable execution paths, and the search time increases with depth. The number of contracts on blockchains like Ethereum has increased 176 fold since December 2015. If these symbolic tools fail to analyze the increasingly large number of contracts in time, entire classes of exploits could cause irrevocable damage. In this paper, we aim to have safer smart contracts against emerging threats. We propose the approach of sequential learning of smart contract weaknesses using machine learning---long-short term memory (LSTM)---that allows us to be able to detect new attack trends relatively quickly, leading to safer smart contracts. Our experimental studies on 620,000 smart contracts prove that our model can easily scale to analyze a massive amount of contracts; that is, the LSTM maintains near constant analysis time as contracts increase in complexity. In addition, our approach achieves $99\%$ test accuracy and correctly analyzes contracts that were false positive (FP) errors made by a symbolic tool.

cs.CR

Some Observations on Modulo 5 Congruences for 2-Color Partitions

The 2-color partitions may be considered as an extension of regular partitions of a natural number $n$, with $p_{k}(n)$ defined as the number of 2-colored partitions of $n$ where one of the 2 colors appears only in parts that are multiples of $k$. In this paper, we record the complete characterization of the modulo 5 congruence relation $p_{k}(25n + 24 - k) \equiv 0 \pmod{5}$ for $k \in \{1, 2, \ldots, 24\}$, in connection with the 2-color partition function $p_k(n)$, providing references to existing results for $k \in \{1, 2, 3, 4, 7, 8, 17\}$, simple proofs for $k \in \{5, 10, 15, 20\}$ for the sake of completeness, and counter-examples in all the remaining cases. We also propose an alternative proof in the case of $k = 4$, without using the Rogers-Ramanujan ratio, thereby making the proof considerably simpler compared to the proof by Ahmed, Baruah and Ghosh Dastidar (JNT 2015).

math.NT

Generalization of a few results in Integer Partitions

In this paper, we generalize a few important results in Integer Partitions; namely the results known as Stanley's theorem and Elder's theorem, and the congruence results proposed by Ramanujan for the partition function. We generalize the results of Stanley and Elder from a fixed integer to an array of subsequent integers, and propose an analogue of Ramanujan's congruence relations for the `number of parts' function instead of the partition function. We also deduce the generating function for the `number of parts', and relate the technical results with their graphical interpretations through a novel use of the Ferrer's diagrams.

cs.DM

Extension of Stanley's Theorem for Partitions

In this paper we present an extension of Stanley's theorem related to partitions of positive integers. Stanley's theorem states a relation between "the sum of the numbers of distinct members in the partitions of a positive integer $n$" and "the total number of 1's that occur in the partitions of $n$". Our generalization states a similar relation between "the sum of the numbers of distinct members in the partitions of $n$" and the total number of 2's or 3's or any general $k$ that occur in the partitions of $n$ and the subsequent integers. We also apply this result to obtain an array of interesting corollaries, including alternate proofs and analogues of some of the very well-known results in the theory of partitions. We extend Ramanujan's results on congruence behavior of the 'number of partition' function $p(n)$ to get analogous results for the 'number of occurrences of an element $k$ in partitions of $n$'. Moreover, we present an alternate proof of Ramanujan's results in this paper.

cs.DM