Implementation of Multidigit Multiplication Basing on Discrete Cosine and Sine Transforms

A. Tereshchenko, V. Zadiraka
{"title":"Implementation of Multidigit Multiplication Basing on Discrete Cosine and Sine Transforms","authors":"A. Tereshchenko, V. Zadiraka","doi":"10.34229/2707-451x.21.4.7","DOIUrl":null,"url":null,"abstract":"Introduction. The emergence of new parallel computing systems such as multi-core processors, clusters, distributed systems, due to the solution of various applications in different spheres. Among such problems are the calculation of systems of linear algebraic equations with the number of unknown 33-35 million, the calculation of nuclear reactor shells, modeling of physical and chemical processes, aerodynamics, hydrodynamics, information security, and so on. This greatly expands the use of multidigit arithmetic, due to the fact that ignoring rounding errors leads to the fact that sometimes computer solutions are obtained that do not correspond to the physical content. Multidigit multiplication operation is an integral part of the exponentiation by module operation, the speed of which determines the speed of asymmetric cryptographic software and hardware complexes.\nThis paper presents algorithms for implementing the multiplication operation of two N-digit numbers based on discrete cosine and sine transforms (DCT and DST) by separating the calculation for the real and imaginary parts of the DFT. Calculation of DCT and DST at the expense of additional bit shifts, additions and subtractions reduces the algorithm complexity to linear complexity by the number of integer multiplication operations.\nThe purpose of the article is to reduce the number of multiplication operations to speed up the execution time of the multiplication operation of two N-bit numbers based on discrete transforms. Reduce the number of complex multiplication operations. Reduce the overall computational complexity and find a modification in which the calculation steps will correspond to DCT, DSP, IDCT and IDST. Use the coefficients to take into account the rounding errors to exclude multiplication operations on calculating DCT, DST, IDCT and IDST.\nResults. The relationship between DCT, DST and DFT of a real signal is considered, which allows to separate calculations for real and imaginary parts of DFT of real signals. The computational complexity is reduced almost twice at the expense of use of DFT properties of real signals. It is shown that after optimization steps of the algorithm calculation correspond to DCT, DST, IDCT and IDST. Using additional coefficients, which allow to take into account rounding errors at each step so that all calculations use integers. An analysis of the choice of word length in the calculation is given. For each algorithm, examples of calculation are given. Tables of dependence of the minimum lengths of the coefficients on the length of the multidigit number and the length of the digit (in bits) are given.\nConclusions. Multiplication algorithms of two N-digit numbers based on discrete cosine and sine transforms (DCT and DST) are presented in this paper. Separating the calculation for the real and imaginary parts of the DFT allows to reduce the number of multiplication operations by 33%. The use of additional coefficients and calculation of DCT, DST, IDCT, IDST at the expense of bit shifts, additions and subtractions reduces the complexity of the multiplication algorithm of two N-digit numbers to linear complexity by the number of simple integer multiplication operations. Based on comparative analysis, it is shown that the proposed method of multiplication based on DCT and DST using integers begins to exceed the Karatsuba method by the number of 32-bit multiplication operations when multiplying numbers, starting with a length of 4096 bits. Keywords: multidigit multiplication, multidigit arithmetic, asymmetric cryptography, discrete cosine transform, discrete sine transform, discrete Fourier transform, fast algorithm for Fourier calculation.","PeriodicalId":34598,"journal":{"name":"Kibernetika ta kompiuterni tekhnologiyi","volume":" ","pages":""},"PeriodicalIF":0.0000,"publicationDate":"2021-12-30","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Kibernetika ta kompiuterni tekhnologiyi","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/10.34229/2707-451x.21.4.7","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
引用次数: 0

Abstract

Introduction. The emergence of new parallel computing systems such as multi-core processors, clusters, distributed systems, due to the solution of various applications in different spheres. Among such problems are the calculation of systems of linear algebraic equations with the number of unknown 33-35 million, the calculation of nuclear reactor shells, modeling of physical and chemical processes, aerodynamics, hydrodynamics, information security, and so on. This greatly expands the use of multidigit arithmetic, due to the fact that ignoring rounding errors leads to the fact that sometimes computer solutions are obtained that do not correspond to the physical content. Multidigit multiplication operation is an integral part of the exponentiation by module operation, the speed of which determines the speed of asymmetric cryptographic software and hardware complexes. This paper presents algorithms for implementing the multiplication operation of two N-digit numbers based on discrete cosine and sine transforms (DCT and DST) by separating the calculation for the real and imaginary parts of the DFT. Calculation of DCT and DST at the expense of additional bit shifts, additions and subtractions reduces the algorithm complexity to linear complexity by the number of integer multiplication operations. The purpose of the article is to reduce the number of multiplication operations to speed up the execution time of the multiplication operation of two N-bit numbers based on discrete transforms. Reduce the number of complex multiplication operations. Reduce the overall computational complexity and find a modification in which the calculation steps will correspond to DCT, DSP, IDCT and IDST. Use the coefficients to take into account the rounding errors to exclude multiplication operations on calculating DCT, DST, IDCT and IDST. Results. The relationship between DCT, DST and DFT of a real signal is considered, which allows to separate calculations for real and imaginary parts of DFT of real signals. The computational complexity is reduced almost twice at the expense of use of DFT properties of real signals. It is shown that after optimization steps of the algorithm calculation correspond to DCT, DST, IDCT and IDST. Using additional coefficients, which allow to take into account rounding errors at each step so that all calculations use integers. An analysis of the choice of word length in the calculation is given. For each algorithm, examples of calculation are given. Tables of dependence of the minimum lengths of the coefficients on the length of the multidigit number and the length of the digit (in bits) are given. Conclusions. Multiplication algorithms of two N-digit numbers based on discrete cosine and sine transforms (DCT and DST) are presented in this paper. Separating the calculation for the real and imaginary parts of the DFT allows to reduce the number of multiplication operations by 33%. The use of additional coefficients and calculation of DCT, DST, IDCT, IDST at the expense of bit shifts, additions and subtractions reduces the complexity of the multiplication algorithm of two N-digit numbers to linear complexity by the number of simple integer multiplication operations. Based on comparative analysis, it is shown that the proposed method of multiplication based on DCT and DST using integers begins to exceed the Karatsuba method by the number of 32-bit multiplication operations when multiplying numbers, starting with a length of 4096 bits. Keywords: multidigit multiplication, multidigit arithmetic, asymmetric cryptography, discrete cosine transform, discrete sine transform, discrete Fourier transform, fast algorithm for Fourier calculation.
基于离散余弦和正弦变换的多位数乘法实现
介绍。新的并行计算系统如多核处理器、集群、分布式系统的出现,由于解决了不同领域的各种应用。这些问题包括未知数量为33-35百万的线性代数方程组的计算、核反应堆壳的计算、物理和化学过程的建模、空气动力学、流体动力学、信息安全等。这极大地扩展了多位数算术的使用,因为忽略舍入误差会导致有时获得的计算机解与物理内容不对应。多位数乘法运算是模块求幂运算的重要组成部分,其运算速度决定了非对称密码软、硬件复合体的速度。本文提出了一种基于离散余弦和正弦变换(DCT和DST)的算法,通过分离DFT的实部和虚部的计算来实现两个n位数的乘法运算。DCT和DST的计算以额外的位移、加法和减法为代价,通过整数乘法运算的次数将算法复杂度降低到线性复杂度。本文的目的是减少乘法运算的次数,以加快基于离散变换的两个n位数字的乘法运算的执行时间。减少复杂乘法运算的次数。降低整体的计算复杂度,找到一种将计算步骤对应于DCT、DSP、IDCT和IDST的修改方法。使用系数来考虑舍入误差,以排除计算DCT、DST、IDCT和idst结果时的乘法运算。考虑了实数信号的DCT、DST和DFT之间的关系,使得实数信号的DFT的实部和虚部可以分开计算。以利用实际信号的DFT特性为代价,将计算复杂度降低了近两倍。结果表明,优化后的算法计算步骤对应于DCT、DST、IDCT和IDST。使用额外的系数,允许在每个步骤中考虑舍入误差,以便所有计算都使用整数。对计算中字长的选择进行了分析。对每一种算法都给出了计算实例。给出了系数的最小长度与多位数长度和位长度的关系表。提出了基于离散余弦变换和离散正弦变换(DCT和DST)的两个n位数的乘法算法。将DFT的实部和虚部的计算分离可以将乘法运算的次数减少33%。利用附加系数,以位移、加减为代价计算DCT、DST、IDCT、IDST,通过简单整数乘法运算的次数,将两个n位数的乘法算法的复杂度降低到线性复杂度。通过对比分析表明,本文提出的基于DCT和DST的整数乘法方法,从长度为4096位开始,在32位乘法运算次数上开始超过Karatsuba方法。关键词:多位乘法,多位算术,非对称密码学,离散余弦变换,离散正弦变换,离散傅立叶变换,傅立叶计算的快速算法。
本文章由计算机程序翻译,如有差异,请以英文原文为准。
求助全文
约1分钟内获得全文 求助全文
来源期刊
自引率
0.00%
发文量
20
审稿时长
6 weeks
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
确定
请完成安全验证×
copy
已复制链接
快去分享给好友吧!
我知道了
右上角分享
点击右上角分享
0
联系我们:info@booksci.cn Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。 Copyright © 2023 布克学术 All rights reserved.
京ICP备2023020795号-1
ghs 京公网安备 11010802042870号
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术官方微信
小红书