From 4f1d7424e6c728f1c92e9e6c367ecf484faf9a87 Mon Sep 17 00:00:00 2001 From: sangge-redmi <2251250136@qq.com> Date: Tue, 22 Apr 2025 14:49:34 +0800 Subject: [PATCH] feat: stage my paper --- paper/build.sh | 31 + paper/chapters/abs-chinese.tex | 29 + paper/chapters/abs-english.tex | 43 + paper/chapters/appden01.tex | 34 + paper/chapters/appden02.tex | 10 + paper/chapters/chapter01.tex | 64 + paper/chapters/chapter02.tex | 353 ++++ paper/chapters/chapter03.tex | 263 +++ paper/chapters/chapter04.tex | 157 ++ paper/chapters/chapter05.tex | 116 ++ paper/chapters/original.tex | 38 + paper/chapters/pagetitle-chinese.tex | 64 + paper/chapters/ref.tex | 23 + paper/chapters/thanks.tex | 34 + paper/latex_settings/custom-chinese.tex | 228 +++ paper/main.tex | 47 + paper/reference/gbt7714-2005.bst | 1956 +++++++++++++++++++++++ paper/reference/ref.bib | 831 ++++++++++ 18 files changed, 4321 insertions(+) create mode 100755 paper/build.sh create mode 100644 paper/chapters/abs-chinese.tex create mode 100644 paper/chapters/abs-english.tex create mode 100644 paper/chapters/appden01.tex create mode 100644 paper/chapters/appden02.tex create mode 100644 paper/chapters/chapter01.tex create mode 100644 paper/chapters/chapter02.tex create mode 100644 paper/chapters/chapter03.tex create mode 100644 paper/chapters/chapter04.tex create mode 100644 paper/chapters/chapter05.tex create mode 100644 paper/chapters/original.tex create mode 100644 paper/chapters/pagetitle-chinese.tex create mode 100644 paper/chapters/ref.tex create mode 100644 paper/chapters/thanks.tex create mode 100644 paper/latex_settings/custom-chinese.tex create mode 100644 paper/main.tex create mode 100644 paper/reference/gbt7714-2005.bst create mode 100644 paper/reference/ref.bib diff --git a/paper/build.sh b/paper/build.sh new file mode 100755 index 0000000..afbb38d --- /dev/null +++ b/paper/build.sh @@ -0,0 +1,31 @@ +#!/bin/bash + +# 检查是否有debug参数 +if [[ "$1" == "debug" ]]; then + DEBUG=true +else + DEBUG=false +fi + +# 创建 build 目录(如果不存在) +mkdir -p build +mkdir -p build/chapters + +# 完整编译流程 +if [[ "$DEBUG" == "true" ]]; then + # Debug模式:显示所有输出 + echo "Running in debug mode - showing all output" + xelatex -output-directory=build main + bibtex build/main + xelatex -output-directory=build main + xelatex -output-directory=build main +else + # 正常模式:仅显示错误和警告 + xelatex -output-directory=build main 2>&1 | rg -i "error|warning" + bibtex build/main 2>&1 | rg -i "error|warning" + xelatex -output-directory=build main 2>&1 | rg -i "error|warning" + xelatex -output-directory=build main 2>&1 | rg -i "error|warning" +fi + +# 可选:添加成功提示 +echo "Compilation completed. Output files are in ./build/" diff --git a/paper/chapters/abs-chinese.tex b/paper/chapters/abs-chinese.tex new file mode 100644 index 0000000..1299bde --- /dev/null +++ b/paper/chapters/abs-chinese.tex @@ -0,0 +1,29 @@ +%% 中文摘要页 +\pdfbookmark[0]{摘要}{abstract-zh} +\begin{center}\heiti\sanhao\textbf{ + 摘要 + } +\end{center} + +为了适应数据要素化背景下数据流通需求场景, +针对分布式环境下多节点参与,数据安全授权变得尤为重要, +本项目提出分布式环境下基于国密的代理重加密算法, +将传统代理重加密中的单代理节点,拆分为多个代理节点, +结合门限代理重加密和国密算法的特点,确保在客户端与中心服务器间、中心服务器与不同节点间、 +客户端和不同节点间的数据传输和存储过程中,数据保持完整和隐私性。 + +与传统的访问控制和权限管理方法相比, +本项目算法具有以下优点: +高强度加密:使用门限代理重加密技术对数据进行高强度加密,保护数据的机密性和隐私性。 +分布式架构:采用分布式架构实现对分布式数据的访问控制和授权管理,解决了传统方法在分布式场景下的难题。 +自主可控:基于国密算法设计,保证了数据的自主可控性,可以有效地避免数据泄露和信息安全风险。 +高效性能:算法实现简单、计算量小,可在现有的计算资源下高效地进行数据安全共享和授权管理。 + +为了验证所提出系统的有效性和性能,本项目进行了一系列的实验测试。 +测试结果表明,该基于国密算法的代理重加密系统在分布式环境中具有优越的加密速度、解密效率和扩展性。 + +因此,本项目方案为分布式数据的安全传输和存储提供了一个高效且安全的解决方案, +并为区块链环境下隐私计算带来了新的研究视角和实践经验。 + +\textbf{关键词:}分布式计算;国密算法;代理重加密;数据共享;权限管理 +\clearpage diff --git a/paper/chapters/abs-english.tex b/paper/chapters/abs-english.tex new file mode 100644 index 0000000..139acd6 --- /dev/null +++ b/paper/chapters/abs-english.tex @@ -0,0 +1,43 @@ +% 英文摘要页 +\pdfbookmark[0]{Abstract}{abstract-en} +\begin{center}\heiti\sanhao\textbf{ + Abstract + } +\end{center} + +In response to the data circulation requirements in the context of data elementization, +data security authorization becomes particularly important in distributed environments with multi-node participation. +This project proposes a distributed proxy re-encryption algorithm based on Chinese cryptographic standards. +The traditional single-proxy node in proxy re-encryption is split into multiple proxy nodes, +combining threshold proxy re-encryption and Chinese cryptographic algorithm characteristics to +ensure data integrity and privacy during data transmission and storage between clients and central servers, +central servers and different nodes,and clients and different nodes. + +Compared with traditional access control and permission management methods, +the algorithm in this project has the following advantages: +High-strength encryption: +Uses threshold proxy re-encryption technology to provide high-strength encryption of data, +protecting data confidentiality and privacy. +Distributed architecture: +Implements access control and authorization management for distributed data through a distributed architecture, +solving the challenges faced by traditional methods in distributed scenarios. +Independent control: +Designed based on Chinese cryptographic algorithms, +ensuring data sovereignty and effectively preventing data leakage and information security risks. +High performance: +Simple algorithm implementation with low computational complexity, +enabling efficient data security sharing and authorization management with existing computational resources. + +To verify the effectiveness and performance of the proposed system, +this project conducted a series of experimental tests. +The test results show that this proxy re-encryption system based on +Chinese cryptographic algorithms demonstrates superior encryption speed, +decryption efficiency, and scalability in distributed environments. + +Therefore, this project provides an efficient and secure solution for distributed data transmission and storage, +bringing new research perspectives and practical experience to privacy computing in blockchain environments. + +\textbf{Keywords:} Distributed Computing; Chinese Cryptographic Algorithm; Proxy Re-encryption; Data Sharing + +\newpage\quad %加一页,使得目录第一页的页眉为 目录 +\clearpage diff --git a/paper/chapters/appden01.tex b/paper/chapters/appden01.tex new file mode 100644 index 0000000..fc68db7 --- /dev/null +++ b/paper/chapters/appden01.tex @@ -0,0 +1,34 @@ +%% 附录页 + +\chapter{附录A \ \ \ \ 科技写作中非学术型低级错误的主要表现} + +本附录主要针对学位论文写作或中文科技论文写作,供重庆邮电大学学位论文查非工作参考。 +未尽事宜,可参考重庆邮电大学论文写作要求、重庆邮电大学学报编辑部等国内期刊社、 +出版社的通用出版规定。 + +推荐阅读《科学出版社作者编辑手册》、 +《科学道德与学风建设宣传参考大纲(试用本)》等写作指导性书籍或资料, +可了解更多、更详尽的通用写作出版规范。 + +\textcolor{red}{(注:对于一些不宜放入正文中, + 但作为毕业设计(论文)又不可缺的组成部分或具有重要参考价值的内容, + 可编入毕业设计(论文)的附录中,例如,公式的推演、源程序代码、附图等内容。 + 附录的内容为备选项目,作者可根据内容的需要决定附录的项目数, + 用附录A、附录B方式编号。附录的篇幅不宜太多。 + 附录与主体部分一起编制页码。若附录部分有手工制作或复印件, + 手工制作或复印件部分要装订在内但可以不计页码。附录的文字按照正文格式进行排版。)} + +\textcolor{red}{(附:科技写作中非学术型低级错误的主要表现见 moban文件夹下)} + +\textbf{代码效果演示:} +\begin{python} + # 这是一段代码测试 + def CQUPT(): + print("Hello,CQUPT") + print("学长学长,给咱们讲讲3G芯片的故事呗。") + print("这是世界上第一枚0.13微米工艺的TD-SCDMA 3G手机基带芯片。" + +"它的诞生,标志着我国3G通信核心芯片等关键...") + CQUPT() +\end{python} +\newpage\quad %加一页,使得附录B第一页的页眉为 附录B + diff --git a/paper/chapters/appden02.tex b/paper/chapters/appden02.tex new file mode 100644 index 0000000..91dcc11 --- /dev/null +++ b/paper/chapters/appden02.tex @@ -0,0 +1,10 @@ +%% 附录页 + + +\chapter{附录B\ \ \ \ 英文翻译} +% \addcontentsline{toc}{chapter}{附录} + +\textcolor{red}{指导教师制定与专业相关的外文文献内容, + 由学生独立翻译成中文,其外文文献内容翻译成中文后的内容不得少于3000字符。 + 译文和原文附于附录部分,按照正文格式进行排版。 + 若原文没有电子版只是原版的复印件,复印件装订在内可不计页码。} diff --git a/paper/chapters/chapter01.tex b/paper/chapters/chapter01.tex new file mode 100644 index 0000000..97ef2b8 --- /dev/null +++ b/paper/chapters/chapter01.tex @@ -0,0 +1,64 @@ +\chapter{引言} + +\section{研究背景和意义} + +随着数字经济的快速发展,数据要素化已成为推动经济社会发展的重要驱动力。 +在分布式环境下,数据的安全流通和共享变得愈发重要, +尤其是在涉及多个参与节点的场景中,如何保证数据传输和存储过程的安全性成为亟待解决的关键问题。 + +如何结合分布式技术完成数据的安全共享一直是热门研究方向, +自从2008年Nakamoto +\cite{nakamoto2008bitcoin} +(中本聪)发表了一篇《比特币:一种点对点的电子现金系统》后, +吸引了无数来自不同学术领域的学者的关注。 + +当前,传统的数据安全授权方案在分布式环境下面临诸多挑战: +首先,单一的授权节点容易成为系统安全的薄弱环节; +其次,现有的授权机制难以满足分布式环境下多方协同的需求; +最后,在确保数据安全的同时如何保持系统效率,也是一个重要问题。 + +本课题的研究对推动数据要素安全流通具有重要的理论和实践意义。 +在理论层面,本研究将门限密码学与代理重加密技术相结合, +拓展了传统代理重加密的应用场景。在实践层面,本研究提出的基于国密算法的分布式代理重加密方案, +为解决分布式环境下的数据安全授权问题提供了可行的技术路径。 + +\section{国内外研究现状} + +\subsection{国外研究现状} + +在国外,代理重加密技术的研究始于Blaze\cite{blaze1998divertible}等人1998年提出的概念。 +近年来,随着分布式系统的普及,国际学术界对分布式环境下的数据安全授权展开了深入研究。主要包括: + +1)基于属性的代理重加密方案,实现了更细粒度的访问控制 + +2)门限代理重加密技术,提高了系统的容错性和可靠性 + +3)基于格密码的代理重加密方案,为抵抗量子计算攻击提供了可能 + +\subsection{国内研究现状} + +国内在数据安全授权领域的研究主要集中在以下方面: + +1)国密算法在代理重加密中的应用研究 + +2)基于区块链的分布式授权机制研究 + +3)面向特定领域的数据安全共享方案研究 + +然而,目前的研究仍存在一些不足,如计算效率有待提高、安全性证明不够完备等问题。 + +\section{主要内容和工作安排} + +本文共分为五章,具体安排如下: + +第1章为引言,介绍研究背景、意义及国内外研究现状。 + +第2章为理论基础,阐述代理重加密、门限密码和国密算法的基本原理。 + +第3章为系统设计,详细描述分布式环境下基于国密的代理重加密方案。 + +第4章为实验验证,通过多组对比实验验证系统的性能和安全性。 + +第5章为总结与展望,总结研究成果并提出未来的研究方向。 + +本研究预期在保证数据安全性的同时,实现高效的分布式数据授权管理,为解决数据要素化背景下的数据安全流通问题提供新的技术方案。 diff --git a/paper/chapters/chapter02.tex b/paper/chapters/chapter02.tex new file mode 100644 index 0000000..9ecca6c --- /dev/null +++ b/paper/chapters/chapter02.tex @@ -0,0 +1,353 @@ +\chapter{理论基础} + +\section{代理重加密} + +代理重加密是一种特殊的公钥加密技术,允许代理为第三方重加密消息, +而不需要知道消息的具体内容。 +这项技术使得原始加密数据的所有者可以授权代理为第三方重新加密其数据, +而不必将原始数据或解密密钥透露给代理,从而保证了数据安全性和保密性。 + +\subsection{基本原理} + +在代理重加密系统中,通常涉及三个角色:数据拥有者(Alice)、数据接收者(Bob)和代理服务器。其工作流程如下: + +\begin{enumerate} + \item Alice首先使用自己的公钥对数据M进行加密,产生密文C + \item 当Alice希望Bob能够访问其加密数据时,她会创建一个重加密密钥rk,并将其提供给代理服务器 + \item 代理服务器使用重加密密钥rk将Alice的加密数据C转化为重加密密文C' + \item Bob使用自己的私钥对重加密密文C'进行解密,得到原始数据M +\end{enumerate} + +在这个过程中,代理服务器既不能访问原始数据,也不能访问解密密钥,从而保证了数据的安全性。 + +\section{门限密码} + +\section{Shamir密码共享方案} + +Shamir密码共享方案其核心思想是通过多项式插值来达到一个目的,由Adi Shamir +\cite{Shamir1979How} +在1979年提出。其定义如下: + +$(t,n)$-Shamir是一种方法,使得一个秘密$S$可以被分割为$n$个片段$\{s_1,\ldots,s_n\}$, +这样只有当至少$t$个片段(其中$t \leq n$)集合在一起时,才能恢复原始的秘密$S$。 +如果只有$t-1$个或更少的片段,则无法获得任何关于秘密的信息。 +这种属性称为$(t,n)$阈值方案,其中$t$(也即$threshold$)是必要的片段数量, +$n$是总片段数量。Shamir密码共享方案的原理基于数学中的多项式插值, +尤其是Lagrange插值。以下是其工作原理: + +\begin{enumerate} + \item 选择一个整数$t$,表示需要的最少片段数来恢复秘密。 + \item 为秘密构造一个$t-1$次多项式$f(x)$,其中$f(0)=S$是要分享的秘密: + \[f(x) = a_0 + a_1x + a_2x^2 + \cdots + a_{t-1}x^{t-1}\] + 其中$a_0 = S$,其他系数$a_1,\ldots,a_{t-1}$随机选择。 + \item 为每个参与者选择一个不同的$x$值,并计算相应的$f(x)$。每个$(x,f(x))$对都是一个秘密片段。 + \item 当要恢复秘密时,只需要任意$t$个$(x,f(x))$对,并使用Lagrange插值来恢复$f(0)$,即原始的秘密$S$。 +\end{enumerate} + +% FIX: 修改例子的数据 +举例说明:假设我们有一个秘密数字$S=42$,我们希望将其分割成3个片段, +但只需要2个片段就可以恢复它(即$t=2,n=3$): + +选择一个一次多项式(因为$t-1=1$): +\[f(x) = a_0 + a_1x\] + +假设我们选择$a_1=17$,那么多项式就是: +\[f(x) = 42 + 17x\] + +为每个参与者选择一个$x$值并计算$f(x)$: +\[f(1) = 42 + 17(1) = 59\] +\[f(2) = 42 + 17(2) = 76\] +\[f(3) = 42 + 17(3) = 93\] + +每个参与者分别得到一个片段:$(1,59)$,$(2,76)$和$(3,93)$。 +要恢复秘密,我们可以选择其中任意两个片段。 +假设我们选择$(1,59)$和$(2,76)$,使用Lagrange插值可以计算出$f(0)=42$,从而恢复秘密。 + +具体的Lagrange插值公式为: +\[f(x) = \sum_{i=1}^t y_i \prod_{j=1,j\neq i}^t \frac{x-x_j}{x_i-x_j}\] + +在这个例子中,使用$(1,59)$和$(2,76)$进行插值: +\[f(0) = 59\cdot\frac{0-2}{1-2} + 76\cdot\frac{0-1}{2-1} = 59\cdot(-2) + 76\cdot(-1) = -118 + (-76) = 42\] + +这就恢复出了原始的秘密值42。这个例子展示了Shamir密码共享方案的基本原理和实际应用。 + +该方案的安全性基于: +\begin{itemize} + \item 任意$t-1$个或更少的点无法确定一个$t-1$次多项式 + \item 多项式的系数(除$a_0$外)是随机选择的 + \item 在有限域上进行运算可以进一步增强安全性 +\end{itemize} + +\section{非对称/公钥密码算法} +% FIX: 不应该直接复制wiki,需要改写 +公开密钥密码学(英语:Public-key cryptography) +也称非对称式密码学(英语:Asymmetric cryptography) +是密码学的一种算法,它需要两个密钥,一个是公开密钥, +另一个是私有密钥;公钥用作加密,私钥则用作解密。 +使用公钥把明文加密后所得的密文,只能用相对应的私钥才能解密并得到原本的明文, +最初用来加密的公钥不能用作解密。由于加密和解密需要两个不同的密钥,故被称为非对称加密; + +\subsection{基于大因数分解} +代表算法:RSA + +这类算法的安全性基于大整数分解问题的难度。 +RSA算法的安全性依赖于将两个大质数的乘积进行因式分解的计算复杂度。 +目前已知的最高效算法仍需要超多项式时间,这保证了在足够大的密钥长度下的安全性。 +RSA广泛应用于数字签名、密钥交换和数据加密等场景。 + +\subsection{基于离散对数} +代表算法:DSA、Diffie-Hellman + +这类算法的安全性基于在有限域中计算离散对数的难度。 +DSA(数字签名算法)主要用于生成数字签名,而Diffie-Hellman则是一种密钥交换协议, +允许通信双方在不安全的通信信道上建立共享密钥。这些算法在安全通信和身份验证中扮演重要角色。 + +\subsection{基于椭圆曲线} +代表算法:ECDSA、ECDH、SM2 + +椭圆曲线密码学利用定义在有限域上的椭圆曲线数学性质 +。与传统公钥密码相比,椭圆曲线密码在相同安全水平下需要更短的密钥长度, +提供了更高的计算效率和带宽节约。SM2是中国国家密码算法标准, +是基于椭圆曲线的公钥密码算法,支持数字签名、密钥交换和数据加密功能。 + +\section{杂凑算法} +杂凑算法(也称散列算法或哈希算法)是将任意长度的输入数据转换为固定长度输出的单向函数。 + +理想的杂凑算法应满足以下特性: +\begin{itemize} + \item 单向性:由杂凑值无法逆向推导出原始输入 + \item 抗碰撞性:难以找到具有相同杂凑值的两个不同输入 + \item 雪崩效应:输入的微小变化会导致输出的显著变化 +\end{itemize} + +常见的杂凑算法包括: +\begin{itemize} + \item MD5:输出128位杂凑值,现已被证明存在安全缺陷 + \item SHA家族:包括SHA-1(160位)、SHA-2(224/256/384/512位)和SHA-3系列 + \item SM3:中国商用密码杂凑算法标准,输出256位杂凑值 +\end{itemize} + +杂凑算法广泛应用于数字签名、消息认证码、数据完整性校验和密码存储等场景。 + +\section{对称密码算法} +对称密码算法(英语:Symmetric-key algorithm)使用相同的密钥进行加密和解密操作。 +与非对称加密相比,对称加密计算效率更高, +但密钥分发和管理存在挑战。对称密码主要分为分组密码和流密码两大类。 + +\subsection{分组密码算法} +分组密码将明文分割成固定长度的数据块,然后对每个块进行加密处理。主要特点包括: + +\begin{itemize} + \item 以固定大小的块为单位进行加密 + \item 相同的明文块在相同密钥下产生相同的密文块 + \item 需要配合工作模式使用(如ECB、CBC、CTR等)以处理超出块大小的数据 +\end{itemize} + +代表算法: +\begin{itemize} + \item DES:56位密钥,64位分组,现已不再安全 + \item 3DES:基于DES的三重加密,提高安全性但速度较慢 + \item AES:分组大小128位,支持128/192/256位密钥长度 + \item SM4:中国商用分组密码标准,128位分组和密钥长度 +\end{itemize} + +\subsection{流密码算法} +流密码算法产生一个伪随机密钥流,通过与明文逐位(通常是按位异或)组合来生成密文。主要特点: + +\begin{itemize} + \item 逐位或逐字节处理数据,无需分组 + \item 加密和解密操作相同 + \item 适合实时性要求高或硬件资源受限的场景 +\end{itemize} + +代表算法: +\begin{itemize} + \item RC4:曾广泛应用于SSL/TLS、WEP等协议,但现已被证明存在多种安全问题 + \item ChaCha20:现代高性能流密码,被用于TLS 1.3和许多安全通信场景 + \item ZUC:中国商用流密码标准,用于4G/5G移动通信安全 +\end{itemize} + +流密码算法通常具有更高的加密速度和更低的实现复杂度, +特别适合对吞吐量要求高或资源受限的环境,如无线通信和嵌入式系统。 + +\section{国密算法} + +国密算法是我国自主研发的一系列密码算法标准,主要包括SM2、SM3和SM4等。 + +\subsection{SM2公钥密码算法} + +SM2算法是我国基于椭圆曲线密码体制自主研发的公钥密码算法,包含以下三个主要功能: + +\begin{itemize} + \item SM2-1:数字签名算法 + \item SM2-2:密钥交换协议 + \item SM2-3:公钥加密算法 +\end{itemize} + +相比于传统RSA签名算法,SM2的主要优势在于: +\begin{itemize} + \item 安全性基础:SM2基于椭圆曲线上的离散对数问题(ECDLP),而RSA基于整数分解问题(IFP) + \item 密钥长度:SM2可以用更短的密钥实现与RSA相同的安全强度\cite{nist800-57r5} + \item 计算效率:在同等安全级别下,SM2的椭圆曲线运算比RSA的大整数模幂运算更高效\cite{hankerson2006guide} +\end{itemize} + +% 或者也可以将两个引用合并成一个: +这些优势已在多项研究中得到证实\cite{nist800-57r5,hankerson2006guide}。 + +\subsection{SM3密码杂凑算法} + +SM3哈希算法是密码体系的重要组成部分,是一种将任意长度的消息$M$映射为定长字符串$H(M)$的单向散列函数, +$H(M)$称为$M$的消息摘要。我国基于对SHA-256中的压缩函数进行自主研发并取得重大突破, +国产哈希算法SM3随之诞生。与SHA-256相似,SM3算法同样适用于数字签名、消息认证及随机数生成等场景, +且其安全性略高于SHA-256,国家密码管理局规定SM2算法中的哈希算法为SM3。\cite{SM3StandardGroup2013} + +SM3算法对长度为$l$比特的消息$M$,经过填充和迭代压缩,最终输出一个256比特的杂凑值。算法主要包含以下步骤: + +\subsubsection{填充过程} +设有长度为$l$比特的消息$M$: +\begin{enumerate} + \item 首先将比特"1"添加至消息$M$末尾 + \item 添加$k$个"0",其中$k$是满足公式$(l + 1 + k) \bmod 512 = 448$的最小非负整数 + \item 添加一个64位比特串,表示$l$的值 + \item 填充后的消息$M$比特长度为512的倍数 +\end{enumerate} + +\subsubsection{迭代压缩过程} +分为以下两个主要步骤: + +1. 消息分块与扩展: +\begin{itemize} + \item 将填充好的消息$M$按每512比特分成$n$个组,其中$M = M^{(1)} || M^{(2)} || ... || M^{(n)}$ + \item 将上述分组按消息扩展算法扩展成132个消息字$W_j$,用于压缩函数$CF$ +\end{itemize} + +2. 压缩与输出: +\begin{itemize} + \item 对分组后的消息$M$进行$n$次迭代压缩 + \item $V_i = CF(V_{i-1}, M^{(i)})$,其中$i = 1,2,...,n$ + \item $CF$为压缩函数,通过最终的迭代值得到一个256比特的杂凑值 +\end{itemize} + + + +\subsection{SM4分组密码算法} + +SM4是一种对称密钥分组密码算法,是SMS4算法的标准化版本。其主要特征如下: + +\subsubsection{基本参数} +\begin{itemize} + \item 分组大小:128位 + \item 密钥长度:128位 + \item 加密轮数:32轮 +\end{itemize} + +\subsubsection{算法结构} +\begin{itemize} + \item 采用"置换-置换"(SP)网络结构,区别于传统的"置换-替代"(SPN)结构 + \item 包含非线性变换函数(S盒):将4字节输入转换为4字节输出 + \item 线性变换:用于增强加密强度 + \item 轮函数:每轮使用$F$函数处理数据块和轮密钥 +\end{itemize} + +\subsubsection{密钥处理} +\begin{itemize} + \item 密钥扩展:从128位主密钥生成32个轮密钥 + \item 轮密钥加:通过异或运算将轮密钥与数据块结合 +\end{itemize} + +\subsubsection{工作模式} +SM4支持多种标准工作模式: +\begin{itemize} + \item ECB(电子密码本模式) + \item CBC(密码分组链接模式) + \item CTR(计数器模式) + \item 其他标准分组密码工作模式 +\end{itemize} + +\subsection{混合加密机制} + +\subsubsection{基本原理} +由于公钥密码算法是基于复杂的代数计算,其计算效率远低于对称密码算法。 +因此,在需要加密大量数据时,直接使用公钥密码进行加密并不是最优选择。 +为解决这一问题,现代密码学中普遍采用KEM/DEM混合加密机制: + +\begin{itemize} + \item KEM (Key-Encapsulation Mechanism):密钥封装机制 + \item DEM (Data-Encapsulation Mechanism):数据封装机制 +\end{itemize} + +\subsubsection{工作机制} +KEM/DEM混合加密方案的工作流程如下: + +1. 数据加密过程: +\begin{itemize} + \item DEM使用对称加密算法加密原始数据 + \item 随机生成用于对称加密的会话密钥 + \item KEM使用公钥加密算法对会话密钥进行加密 +\end{itemize} + +2. 数据解密过程: +\begin{itemize} + \item 接收方首先使用私钥解密得到会话密钥 + \item 使用恢复的会话密钥解密获得原始数据 +\end{itemize} + +\subsubsection{优势特点} +KEM/DEM混合加密机制具有以下优势: + +\begin{enumerate} + \item 效率提升 + \begin{itemize} + \item 大量数据使用高效的对称加密 + \item 仅对短小的会话密钥使用公钥加密 + \item 显著提高整体加解密效率 + \end{itemize} + + \item 安全性保障 + \begin{itemize} + \item 结合对称加密和非对称加密的安全优势 + \item 即使会话密钥泄露也不影响其他通信场景 + \item 支持前向安全性 + \end{itemize} + + \item 通信优化 + \begin{itemize} + \item 减少加密数据的传输量 + \item 降低网络带宽占用 + \item 提高通信效率 + \end{itemize} +\end{enumerate} + +\subsubsection{应用场景} +混合加密机制在以下场景中具有广泛应用: + +\begin{itemize} + \item 安全通信协议(如TLS/SSL) + \item 数据加密传输 + \item 文件加密存储 + \item 密钥交换协议 +\end{itemize} + +\subsubsection{具体实现} +在实践中,KEM/DEM 混合加密机制通常采用以下算法组合: +1. KEM (密钥封装机制) 实现选择: +\begin{itemize} + \item 基于椭圆曲线的算法:SM2、ECIES、ECDH 等 + \item 基于整数分解的算法:RSA-OAEP、RSA-KEM 等 + \item 基于格的后量子算法:CRYSTALS-Kyber、NTRU 等 + \item 基于配对的算法:IBE-KEM (基于身份的加密) +\end{itemize} + +2. DEM (数据封装机制) 实现选择: +\begin{itemize} + \item 分组密码及其工作模式:SM4-GCM、AES-GCM、ChaCha20-Poly1305 等 + \item 结合 AEAD (认证加密与关联数据) 模式确保机密性和完整性 + \item 针对高性能需求的流密码或轻量级分组密码:SNOW、AEGIS 等 +\end{itemize} + +\section{本章小结} + +本章介绍了分布式环境下基于国密的代理重加密系统所需的核心理论基础, +包括代理重加密技术、门限密码学和国密算法。 +这些理论为系统的设计和实现提供了必要的技术支撑, +确保了系统的安全性、可靠性和高效性。 diff --git a/paper/chapters/chapter03.tex b/paper/chapters/chapter03.tex new file mode 100644 index 0000000..e38141b --- /dev/null +++ b/paper/chapters/chapter03.tex @@ -0,0 +1,263 @@ +\chapter{系统设计与实现方案} +\section{总体设计} +随着数字经济和分布式系统的发展,数据安全流通和共享日益重要。 +本系统结合门限密码学与代理重加密技术,提出了一种面向分布式环境的代理重加密解决方案。 +该方案具有以下主要特点: + +\begin{itemize} + \item 基于国密算法,确保系统的安全性和合规性 + \item 采用分布式架构,支持多节点协同工作 + \item 实现高效的数据授权和共享机制 + \item 保证数据隐私和完整性 +\end{itemize} + + +系统整体架构包含以下主要组件: + +\begin{itemize} + \item 数据拥有方:负责数据的加密和密钥管理 + \item 数据请求方:负责数据的解密和使用 + \item 代理节点:执行重加密操作 + \item 中心服务器:管理节点信息和协调通信 + \item 数据存储:保存加密数据和相关元信息 +\end{itemize} + + +\section{核心算法设计} +\subsection{算法设计} + +基于国密算法的分布式代理重加密技术共包含6个核心算法,以下详细说明各算法的设计。 +假设数据持有方为Alice,接收方为Bob,代理重加密节点为node。 + +\subsubsection{算法框架概述} + +\begin{enumerate} + \item \textbf{密钥生成算法} ($\mathsf{KeyGen}$): + \begin{itemize} + \item 输入:系统参数 + \item 输出:Alice和Bob的公私钥对 $(pk_A,sk_A)$和$(pk_B,sk_B)$ + \item 功能:生成用户的公私钥对 + \end{itemize} + + \item \textbf{重加密密钥生成算法} ($\mathsf{ReKeyGen}$): + \begin{itemize} + \item 输入: + \begin{itemize} + \item Alice的私钥 $sk_A$ + \item Bob的公钥 $pk_B$ + \item 代理服务器节点数量 $n$ + \item 门限值 $t$ + \end{itemize} + \item 输出:重加密密钥集合 $\{rk_i\}_{i=1}^n$ + \item 说明:$i$ 指代每个代理服务器节点的编号 + \end{itemize} + + \item \textbf{加密算法} ($\mathsf{Encrypt}$): + \begin{itemize} + \item 输入: + \begin{itemize} + \item Alice的公钥 $pk_A$ + \item 明文 $m$ + \end{itemize} + \item 输出:密文 $c$ + \item 实现细节: + \begin{itemize} + \item 采用混合加密机制 + \item 使用SM4实现对称加密 + \item 对称密钥在加密过程中随机生成 + \item 使用SM3实现密钥派生函数KDF + \item 公钥加密保护对称密钥 + \end{itemize} + \end{itemize} + + \item \textbf{解密算法} ($\mathsf{Decrypt}$): + \begin{itemize} + \item 输入: + \begin{itemize} + \item Alice的私钥 $sk_A$ + \item 密文 $c$ + \end{itemize} + \item 输出:明文 $m$ + \item 过程: + \begin{itemize} + \item 首先用私钥解密得到对称密钥 + \item 再用对称密钥解密获得明文 + \end{itemize} + \end{itemize} + + \item \textbf{重加密算法} ($\mathsf{ReEnc}$): + \begin{itemize} + \item 输入: + \begin{itemize} + \item 重加密密钥片段 $rk_i$ + \item 密文 $c$ + \end{itemize} + \item 输出:重加密密文 $c'$ + \item 执行:代理服务器节点进行重加密运算 + \end{itemize} + + \item \textbf{重加密密文解密算法} ($\mathsf{ReDecrypt}$): + \begin{itemize} + \item 输入: + \begin{itemize} + \item Bob的公钥 $pk_B$ + \item Bob的私钥 $sk_B$ + \item Alice的公钥 $pk_A$ + \item 重加密密文 $c'$ + \end{itemize} + \item 输出:明文 $m$ + \end{itemize} +\end{enumerate} + +\subsubsection{算法安全性考虑} + +系统的安全性基于以下几个方面: +\begin{itemize} + \item 基于国密算法SM2、SM3、SM4的密码学安全性 + \item 门限机制提供的分布式安全保障 + \item 混合加密机制的效率与安全性平衡 + \item 重加密过程中的数据保密性 +\end{itemize} + +\subsection{关键技术} +系统采用了以下关键技术: + +\begin{itemize} + \item SM2椭圆曲线密码算法:用于非对称加密 + \item SM3哈希算法:确保数据完整性 + \item SM4分组密码:实现高效的对称加密 + \item 门限密码技术:支持分布式密钥管理 + \item 混合加密机制:结合对称和非对称加密优势 +\end{itemize} + +\section{实现细节} +基于国密算法的分布式代理重加密技术共包含6个算法,分别为密钥对生成算法$KeyGen$、 +重加密密钥生成算法$ReKeyGen$、加密$Enc$、解密算法$Dec$、重加密算法$ReEnc$、 +重加密密文解密算法$ReDec$。 + +假设数据持有方为Alice,接收方为Bob,代理重加密节点为node,具体算法框架如下: + +$KeyGen$:Alice和Bob随机生成各自公私钥对$(pk_A,sk_A)$和$(pk_B,sk_B)$; + +$ReKeyGen$:输入Alice的私钥$sk_A$,Bob的公钥$pk_B$,所有代理服务器节点数量$n$和门限$t$, +输出重加密密钥集合$rk$。这里的$i$指的是代理服务器节点的$ID$; + +$Enc$:输入Alice的公钥$pk_A$和明文$m$,输出密文$ct$;这里并不是直接使用$pk_A$加密明文$m$, +因为会导致性能过低问题,在底层加密时,使用的是对称加密算法, +在本文中使用$SM4$实现对称加密算法。其对称密钥是在加密过程中随机产生, +对称加密密钥由公钥加密保护;生成对称密钥时,需要用到密码哈希函数构建的密钥派生函数$KDF$, +本文中使用$SM3$算法实现该$KDF$函数; + +$Dec$:输入Alice的私钥$sk_A$和密文$ct$,输出明文$m$;这里是加密算法的逆过程, +即用$sk_A$解密得到对称加密密钥,再解密密文; + +$ReEnc$:代理服务器节点输入重加密密钥片段$rk_i$和密文$ct$,输出重加密密文$ct'$; + +$ReDec$:输入Bob的公钥$pk_B$和私钥$sk_B$,A的公钥$pk_A$,重加密密文$ct'$,输出明文$m$。基于国密算法的分布式代理重加密实现流程如图所示。 + +密钥对生成算法$KeyGen$步骤如下: + +\begin{enumerate} + \item 选择适当的椭圆曲线参数和基点G + \item 随机生成私钥$sk$ + \item 计算公钥$pk = sk * G$ + \item 输出密钥对$(pk,sk)$ +\end{enumerate} + +重加密密钥生成算法$ReKeyGen$步骤如下: + +\begin{enumerate} + \item 输入Alice的私钥$sk_A$和Bob的公钥$pk_B$ + \item 选择随机数$r$作为重加密密钥 + \item 计算$rk = r * sk_A * pk_B$ + \item 输出重加密密钥$rk$ +\end{enumerate} + +加密算法$Enc$步骤如下: + +\begin{enumerate} + \item 输入公钥$pk$和消息$m$ + \item 生成随机会话密钥$k$ + \item 使用$SM4$对称加密消息: $c_1 = SM4_k(m)$ + \item 使用公钥加密会话密钥: $c_2 = pk * k$ + \item 输出密文$(c_1,c_2)$ +\end{enumerate} + +解密算法$Dec$步骤如下: + +\begin{enumerate} + \item 输入私钥$sk$和密文$(c_1,c_2)$ + \item 使用私钥恢复会话密钥: $k = c_2/sk$ + \item 使用会话密钥解密消息: $m = SM4^{-1}_k(c_1)$ + \item 输出明文$m$ +\end{enumerate} + +重加密算法$ReEnc$步骤如下: + +\begin{enumerate} + \item 输入重加密密钥$rk$和密文$(c_1,c_2)$ + \item 重新加密会话密钥: $c_2' = rk * c_2$ + \item 输出重加密密文$(c_1,c_2')$ +\end{enumerate} + +重加密密文解密算法$ReDec$步骤如下: + +\begin{enumerate} + \item 输入Bob的私钥$sk_B$和重加密密文$(c_1,c_2')$ + \item 恢复会话密钥: $k = c_2'/sk_B$ + \item 解密消息: $m = SM4^{-1}_k(c_1)$ + \item 输出明文$m$ +\end{enumerate} + +\subsection{系统流程} + +\begin{enumerate} + \item 数据拥有方生成公私钥对并加密数据 + \item 数据请求方向拥有方申请访问权限 + \item 拥有方同意后生成重加密密钥片段 + \item 代理节点执行重加密操作 + \item 数据请求方接收并解密数据 +\end{enumerate} + +\subsection{关键模块} +\subsubsection{密钥管理模块} +\begin{itemize} + \item 实现公私钥对的生成和管理 + \item 支持重加密密钥的分发和更新 + \item 确保密钥的安全存储 +\end{itemize} + +\subsubsection{加解密模块} +\begin{itemize} + \item 封装国密算法接口 + \item 实现混合加密机制 + \item 提供数据加解密服务 +\end{itemize} + +\subsubsection{代理重加密模块} +\begin{itemize} + \item 执行重加密运算 + \item 管理重加密密钥片段 + \item 协调多节点操作 +\end{itemize} + +\subsubsection{通信模块} +\begin{itemize} + \item 基于HTTP协议 + \item 实现节点间安全通信 + \item 支持异步数据传输 +\end{itemize} + +\section{安全性分析} +系统的安全性主要体现在以下方面: +\begin{itemize} + \item 基于国密算法的密码学安全性 + \item 分布式架构降低单点故障风险 + \item 门限机制提供容错能力 + \item 完整性校验确保数据不被篡改 + \item 访问控制保护数据隐私 +\end{itemize} + +\section{本章小结} +本章详细介绍了系统的设计方案和实现细节,包括总体架构、核心算法、关键技术和具体实现。 +通过合理的系统设计和可靠的技术实现,确保了系统在分布式环境下能够安全高效地完成数据共享和授权管理任务 diff --git a/paper/chapters/chapter04.tex b/paper/chapters/chapter04.tex new file mode 100644 index 0000000..5bf8e52 --- /dev/null +++ b/paper/chapters/chapter04.tex @@ -0,0 +1,157 @@ +\chapter{系统测试与结果分析} + +\section{测试环境} + +\subsection{本地测试环境} + +本系统在以下环境中进行本地测试: + +\begin{table}[h] + % FIX:需要更新windows测试环境 + \centering + \caption{本地系统环境} + \begin{tabular}{ll} + \hline + \textbf{计算机系统} & \textbf{版本} \\ + \hline + 处理器 & Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz \\ + 操作系统 & Windows 10 \\ + \hline + \textbf{软件} & \textbf{版本} \\ + \hline + Python & 3.8.0 \\ + gmssl & 3.2.1 \\ + SQLite & 3.39.3 \\ + \hline + \end{tabular} +\end{table} + +\begin{table}[h] + \centering + \caption{本地系统环境2} + \begin{tabular}{ll} + \hline + \textbf{计算机系统} & \textbf{版本} \\ + \hline + 处理器 & AMD Ryzen 5 4500U (6) @ 2.38 GHz \\ + 操作系统 & Kali GNU/Linux Rolling x86\_64 \\ + \hline + \textbf{软件} & \textbf{版本} \\ + \hline + Python & 3.13.3 \\ + gmssl & 3.2.1 \\ + SQLite & 3.39.3 \\ + \hline + \end{tabular} +\end{table} + +\subsection{云端测试环境} + +云端测试采用华为云服务器,具体配置如下: + +\begin{table}[h] + \centering + \caption{云端系统环境} + \begin{tabular}{ll} + \hline + \textbf{服务器} & \textbf{配置} \\ + \hline + 规格 & 2vCPUs | 4GiB \\ + \hline + \textbf{软件} & \textbf{版本} \\ + \hline + Docker & 24.0.5 \\ + Redis & 7.0.11 \\ + Node.js & 18.16.0 \\ + \hline + \end{tabular} +\end{table} + +\section{功能测试} +\subsection{密钥生成与管理测试} +测试了系统的密钥生成和管理功能,包括: +\begin{enumerate} + \item 公私钥对生成 + \item 重加密密钥生成 + \item 密钥分发和存储 +\end{enumerate} +测试结果表明,系统能够正确生成和管理各类密钥,确保密钥的唯一性和安全性。 + +\subsection{加密解密测试} +对系统的加密解密功能进行了全面测试: +\begin{enumerate} + \item 原始数据加密 + \item 重加密操作 + \item 密文合并 + \item 解密验证 +\end{enumerate} +测试结果显示,系统能够正确完成各类加解密操作,保证数据的机密性和完整性。 + +\section{性能测试} + +\subsection{算法性能测试} + +在不同节点数(N)和门限值(T)配置下进行测试,主要测试指标包括: +\begin{enumerate} + \item 算法总运行时间 + \item 密钥生成时间 + \item 加密算法时间 + \item 重加密密钥生成时间 + \item 重加密算法时间 + \item 解密算法时间 +\end{enumerate} + +测试结果显示: +\begin{enumerate} + % FIX: 需要进行大规模测试 + \item 当N=20,T=10时,系统性能最优 + \item 算法执行时间远小于1秒的性能要求 + \item 随着节点数增加,系统仍保持良好的扩展性 +\end{enumerate} + +\subsection{系统响应时间测试} +对系统在云端环境下的响应性能进行测试: +\begin{enumerate} + \item 异步处理数据时间 + \item 通信延迟 + \item 并发处理能力 +\end{enumerate} +测试结果表明系统具有良好的响应性能和并发处理能力。 + +\section{安全性测试} +\subsection{数据完整性测试} +通过修改密文内容,验证系统的数据完整性保护机制: +\begin{enumerate} + \item 测试结果显示系统能够有效检测数据篡改 + \item 非法修改的数据无法通过完整性验证 + \item 保证了数据在传输和存储过程中的完整性 +\end{enumerate} + +\subsection{访问控制测试} +验证系统的访问控制机制: +\begin{enumerate} + \item 使用错误的私钥进行解密 + \item 使用不完整的重加密密钥片段 + \item 测试unauthorized访问 +\end{enumerate} +测试结果表明系统能够有效防止未授权访问。 + +\section{测试结果分析} +\subsection{性能分析} +系统性能测试结果显示: +\begin{enumerate} + \item 算法执行效率高,总运行时间<1s + \item 当门限T为节点数N的一半时,性能最优 + \item 系统具有良好的可扩展性 +\end{enumerate} + +\subsection{安全性分析} +安全性测试结果表明: +\begin{enumerate} + \item 基于国密算法的加密方案安全可靠 + \item 门限机制有效防止单点故障 + \item 访问控制机制有效运行 + \item 数据完整性得到保障 +\end{enumerate}\section{本章小结} + +通过全面的功能测试、性能测试和安全性测试,验证了系统的可靠性、高效性和安全性。测试结果表明,该系统能够满足分布式环境下的数据安全共享需求,具有良好的应用前景。系统在性能和安全性方面均达到了预期目标,为后续的实际部署应用奠定了基础。 diff --git a/paper/chapters/chapter05.tex b/paper/chapters/chapter05.tex new file mode 100644 index 0000000..9a6c9e1 --- /dev/null +++ b/paper/chapters/chapter05.tex @@ -0,0 +1,116 @@ +\chapter{总结与展望} + +\section{主要工作总结} + +本文设计并实现了一个面向分布式环境的基于国密算法的代理重加密系统,主要完成了以下工作: + +1. 系统设计与实现 +- 设计了完整的分布式代理重加密方案 +- 实现了基于国密算法的加密框架 +- 开发了支持多节点协同的分布式系统 +- 完成了系统各模块的集成与部署 + +2. 关键技术创新 +- 将门限密码学与代理重加密技术相结合 +- 采用国密算法确保系统安全性 +- 实现了高效的混合加密机制 +- 设计了灵活的密钥管理方案 + +3. 性能与安全性验证 +- 进行了全面的功能测试 +- 完成了系统性能评估 +- 验证了安全机制的有效性 +- 确认了系统的可靠性 + +\section{系统特点与优势} + +本系统具有以下主要特点和优势: + +1. 安全性 +- 基于国密算法保证密码学安全 +- 采用门限机制防止单点故障 +- 实现了完整的访问控制 +- 确保数据传输和存储安全 + +2. 高效性 +- 算法实现简单、计算量小 +- 支持高效的数据共享和授权 +- 具有良好的系统响应性能 +- 计算效率优于传统方案 + +3. 适应性 +- 支持分布式环境部署 +- 具有良好的可扩展性 +- 易于与现有系统集成 +- 适用于多种应用场景 + +\section{应用前景} + +随着数字经济的发展,本系统在以下领域具有广阔的应用前景: + +1. 数据共享平台 +- 支持安全的数据交换 +- 实现灵活的权限管理 +- 保护数据隐私 +- 提高数据利用效率 + +2. 区块链系统 +- 实现数据访问控制 +- 保护交易隐私 +- 支持动态权限调整 +- 优化数据共享机制 + +3. 云计算环境 +- 保护云存储数据 +- 支持多用户访问 +- 确保数据安全 +- 提供可控分享 + +\section{未来研究方向} + +基于当前研究成果,未来可以在以下方向继续深入: + +1. 算法优化 +- 进一步提高计算效率 +- 优化密钥管理机制 +- 改进重加密方案 +- 增强系统性能 + +2. 功能扩展 +- 支持更多加密算法 +- 增加高级权限管理 +- 扩展应用场景 +- 提供更多接口 + +3. 安全增强 +- 应对新型攻击方式 +- 加强隐私保护 +- 提高系统容错性 +- 增强访问控制 + +4. 实践应用 +- 推进实际部署 +- 验证工程实用性 +- 优化用户体验 +- 完善部署方案 + +\section{本文结论} + +本文提出的分布式环境下基于国密的代理重加密方案, +成功解决了数据安全共享和授权管理的关键问题。 +系统在保证安全性的同时,实现了高效的数据流通, +为推动数据要素化发展提供了可靠的技术支撑。 +通过理论研究和实验验证,证明了该方案在实际应用中的可行性和有效性。 + +随着数字经济的持续发展,数据安全共享的需求将不断增长。 +本研究为解决这一问题提供了新的思路和方法, +为后续研究奠定了基础。未来将继续深化研究, +推动技术创新,为构建安全、高效的数据共享生态做出贡献。 + + + + + + + + diff --git a/paper/chapters/original.tex b/paper/chapters/original.tex new file mode 100644 index 0000000..4f568de --- /dev/null +++ b/paper/chapters/original.tex @@ -0,0 +1,38 @@ +%% 原创性声明 +\begin{center} + \zihao{3}\textbf{\underline{网络空间安全与信息法学院}本科毕业设计(论文)诚信承诺书} +\end{center} + +\zihao{4} +本人郑重承诺: + +我向学院呈交的论文《\underline{分布式环境下基于国密的代理重加密设计实现}》,是本人在指导教师的指导下,独立进行研究工作所取得的成果。除文中已经注明引用的内容外,本论文不含任何其他个人或集体已经发表或撰写过的作品成果。对本文的研究做出重要贡献的个人和集体,均已在文中以明确方式标明并致谢。本人完全意识到本声明的法律结果由本人承担。 + + +\vspace{1cm} +\begin{flushright} +年级:\underline{\makebox[3cm]{\hfill 2021\hfill}}\par +专业:\underline{\makebox[3cm]{\hfill 信息安全\hfill}}\par +班级:\underline{\makebox[3cm]{\hfill 40402101\hfill}}\par +承诺人签名:\underline{\makebox[3cm]{\hfill 梁俊勇\hfill}}\par +\vspace{0.3cm} +\underline{2025}年\underline{1}月\underline{1}日 +\end{flushright} +\vspace{1cm} +\begin{center} +\zihao{2}\textbf{学位论文版权使用授权书} +\end{center} + +本人完全了解重庆邮电大学有权保留、使用学位论文纸质版和电子版的规定,即学校有权向国家有关部门或机构送交论文,允许论文被查阅和借阅等。本人授权重庆邮电大学可以公布本学位论文的全部或部分内容,可编入有关数据库或信息系统进行检索、分析或评价,可以采用影印、缩印、扫描或拷贝等复制手段保存、汇编本学位论文。 + +(注:保密的学位论文在解密后适用本授权书。) + +\vspace{1cm} +\noindent +\begin{tabular}{ll} +学生签名:\underline{\hspace{3cm}} & 指导老师签名:\underline{\hspace{3cm}}\\[0.5cm] +日期:\underline{\hspace{1cm}}年\underline{\hspace{1cm}}月\underline{\hspace{1cm}}日 & +日期:\underline{\hspace{1cm}}年\underline{\hspace{1cm}}月\underline{\hspace{1cm}}日 +\end{tabular} + + diff --git a/paper/chapters/pagetitle-chinese.tex b/paper/chapters/pagetitle-chinese.tex new file mode 100644 index 0000000..2d9696d --- /dev/null +++ b/paper/chapters/pagetitle-chinese.tex @@ -0,0 +1,64 @@ +% !TEX root = main.tex + +% 中文封面页, 不能单独编译 +% 格式要求:无页眉页脚, 单独成页,后面空一页 +\pdfbookmark[0]{封面}{cover} +\begin{center} + \newcommand{\settingone}[1]{{\songti\sihao\bfseries #1}} + \noindent {\songti\sanhao\bfseries } \hfill + \newlength{\Mylen} + \settowidth{\Mylen}{\settingone{学\qquad 号:2021212687}} + \begin{minipage}[t]{\Mylen} \sihao + \bfseries 编\qquad 号 : \underline{2018123456} \\ + \bfseries 审定成绩 : \underline{\phantom{2018}\phantom{28B}} %\phantom创建空格 + \end{minipage} + \\ [1mm] + \newlength{\Mylentwo} + \begin{figure*}[h] + \centering + \includegraphics[scale=0.8]{images/logo/logo1.jpg} + \end{figure*} + %{\yihao\bfseries 重庆邮电大学} \\[3mm] + {\yihao\bfseries 本科毕业设计(论文)}\\[3mm] + \begin{figure*}[h] + \centering + \includegraphics[scale=0.2]{images/logo/logo2.jpg} + \end{figure*} + + \begin{table}[ht] + \centering + \renewcommand\arraystretch{1.25} + \begin{tabular}{p{2cm}p{9cm}} + \makecell[c]{\bfseries\sihao 中文题目} & \makecell[c]{\bfseries\sihao 分布式环境下基于国密的} \\ + \cline{2-2} + & \makecell[c]{\bfseries\sihao 代理重加密设计实现} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 英文题目} & \makecell[c]{\bfseries\sihao Distributed Proxy Re-encryption Based } \\ + \cline{2-2} + & \makecell[c]{\bfseries\sihao on Chinese Cryptographic Standards} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 学院名称} & \makecell[c]{\bfseries\sihao 网络空间安全与信息法学院} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 学生姓名} & \makecell[c]{\bfseries\sihao 梁俊勇} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 专\qquad 业} & \makecell[c]{\bfseries\sihao 信息安全} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 班\qquad 级} & \makecell[c]{\bfseries\sihao 0231201} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 学\qquad 号} & \makecell[c]{\bfseries\sihao 2021212687} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 指导教师} & \makecell[c]{\bfseries\sihao 左祥建 职称} \\ + \cline{2-2} + \makecell[c]{\bfseries\sihao 答\hspace{6pt}辩\hspace{6pt}组} \\[-2mm] + \makecell[c]{\bfseries\sihao 负\hspace{6pt}责\hspace{6pt}人} & \makecell[c]{\bfseries\sihao 姓名 职称} \\ + \cline{2-2} + \end{tabular} + \end{table} + \vspace{0.1cm} + \bfseries\sihao 2025年\hspace{12pt}6月 + \\[2mm] + \bfseries\sihao 重庆邮电大学教务处制 +\end{center} + + + diff --git a/paper/chapters/ref.tex b/paper/chapters/ref.tex new file mode 100644 index 0000000..fd8928b --- /dev/null +++ b/paper/chapters/ref.tex @@ -0,0 +1,23 @@ +%参考文献是毕业设计(论文)不可缺少的组成部分, +%它反映论文作者的科学态度和毕业设计(论文)的取材来源、广博程度和可靠程度, +%同时能方便地把作者的研究成果与他人的成果区别开来。 +%一份完整的参考文献也是向读者提供的一份有价值的信息资料。 +%参考文献应列入主要的中外文献,数量不少于15篇, +%教科书和硕士论文不多于5本。 +%按论文中参考文献出现的次序,用中括号以数字连续编号,格式参考毕业设计(论文)模版。 +% 参考文献使用 +% 设置参考文献风格,参照使用 +% https://github.com/Haixing-Hu/GBT7714-2005-BibTeX-Style +% +% TeX技巧/参考文献 +% https://www.latexstudio.net/archives/1541.html +% +% TeX技巧/参考文献需要注意的一些小问题 +% https://blog.csdn.net/jialiyk/article/details/124990632 +% +% 参考文献呈现方式 +\bibliographystyle{reference/gbt7714-2005} +% .bib文件名 此参考文献在文件夹reference下,名为ref.bib文件 +\bibliography{reference/ref} +\newpage\quad %加一页,使得致谢第一页的页眉为 致谢 + diff --git a/paper/chapters/thanks.tex b/paper/chapters/thanks.tex new file mode 100644 index 0000000..ea8a4eb --- /dev/null +++ b/paper/chapters/thanks.tex @@ -0,0 +1,34 @@ +%% 致谢 + +\chapter{致谢} + {\songti\xiaosi + \setlength{\parindent}{2em} + 在本科毕业论文的完成过程中,我得到了许多老师和同学的帮助与支持, + 在此谨向他们致以诚挚的感谢。}\par + +{\songti\xiaosi + 首先要特别感谢我的指导教师左祥建老师。在整个研究过程中, + 左老师始终以严谨的治学态度和渊博的专业知识指导我的研究工作。 + 他不仅在选题方向、研究方法等方面给予了悉心指导, + 更在论文的具体写作过程中提出了许多宝贵的修改意见。 + 左老师治学严谨、关怀学生的师德风范,将使我受益终身。}\par + +{\songti\xiaosi + 在整个论文写作过程中,左老师多次牺牲休息时间,认真审阅论文的每一处细节, + 并针对关键技术难点提供了富有建设性的建议。他渊博的学识和敏锐的学术洞察力, + 帮助我克服了研究过程中遇到的诸多困难。他严谨的治学态度和无私的指导精神, + 不仅帮助我完成了论文写作,更为我未来的学术道路树立了榜样。} + +{\songti\xiaosi + 最后,要感谢我的家人。感谢他们在我求学期间给予的理解和支持, + 让我能够专心致志地投入学习和研究。他们的默默付出和无私关爱, + 是我前行路上最温暖的力量。}\par + +{\songti\xiaosi + 求学之路虽已告一段落,但学海无涯,未来仍需不断进取。 + 衷心感谢所有帮助过我的师长、同学和亲人, + 正是有了你们的支持与鼓励,才使得这篇论文得以顺利完成。 + 这份感激之情将永远铭记于心,激励我在未来的道路上继续奋进。} + + +\newpage\quad %加一页,使得附录A第一页的页眉为 附录A diff --git a/paper/latex_settings/custom-chinese.tex b/paper/latex_settings/custom-chinese.tex new file mode 100644 index 0000000..155e8ff --- /dev/null +++ b/paper/latex_settings/custom-chinese.tex @@ -0,0 +1,228 @@ +\usepackage{graphicx} %绘图 +\usepackage{pifont} %圆圈1,如① +\usepackage{booktabs} %绘制三线表 +\usepackage{multirow} %使用https://www.tablesgenerator.com/网站绘制表格所需包 +\usepackage{threeparttable} %表格脚注 +\usepackage[noend]{algpseudocode} %绘制伪代码 +\usepackage{algorithmicx,algorithm} +\usepackage{pythonhighlight} %python代码高亮 +\usepackage[colorlinks=true,linkcolor=black,anchorcolor=black,citecolor=green]{hyperref}%引用参考文献、章节、图表,并跳转 +\usepackage{caption} +\captionsetup[figure]{font=small,labelsep=space} +\captionsetup[table]{font=small,labelsep=space} %图片和表格修改caption + + +\usepackage[final]{pdfpages} +% 设置页边距 +\usepackage{geometry} +\usepackage{makecell} +\usepackage{caption} +\usepackage{multirow} +\usepackage{booktabs} +\makeatletter +\let\c@lofdepth\relax +\let\c@lotdepth\relax +\makeatother +\usepackage{subfigure} +\usepackage{float} +\usepackage[titles,subfigure]{tocloft} +\usepackage{soul} +\usepackage{color,xcolor} + + + +\geometry{a4paper,top=3cm,bottom=2.5cm,left=2.5cm,right=2.5cm} + +% 设置行间距 1.5倍 +\linespread{1.5}\selectfont +% 设置段与段之间的垂直距离 \parskip默认橡皮长度是0pt plus 1pt +\setlength{\parskip}{0pt} +\setlength{\headheight}{15pt} %设置页眉高度 +% \setlength{\parindent}{0pt} + +%设置字体 +% 设置英文字体 +\setmainfont{Times New Roman}[ + BoldFont = Times New Roman Bold, + ItalicFont = Times New Roman Italic, + BoldItalicFont = Times New Roman Bold Italic +] + +\setsansfont{Times New Roman}[ + BoldFont = Times New Roman Bold, + ItalicFont = Times New Roman Italic, + BoldItalicFont = Times New Roman Bold Italic +] + +\setmonofont{Times New Roman}[ + BoldFont = Times New Roman Bold, + ItalicFont = Times New Roman Italic, + BoldItalicFont = Times New Roman Bold Italic +] + +\usepackage{xeCJK} +\setCJKmainfont[AutoFakeBold=true,AutoFakeSlant=true]{SimSun} % 使用宋体作为主要中文字体 +\setCJKsansfont[AutoFakeBold=true,AutoFakeSlant=true]{Noto Sans CJK SC} % 无衬线字体 +\setCJKmonofont[AutoFakeBold=true,AutoFakeSlant=true]{WenQuanYi Micro Hei Mono} % 等宽字体 + +%设置字号 +% \usepackage{ctexsize,type1cm} +\usepackage{type1cm} +\newcommand{\yihao}{\fontsize{26pt}{39pt}\selectfont} +\newcommand{\xiaoyi}{\fontsize{24pt}{36pt}\selectfont} +\newcommand{\erhao}{\fontsize{22pt}{33pt}\selectfont} +\newcommand{\xiaoer}{\fontsize{18pt}{27pt}\selectfont} +\newcommand{\sanhao}{\fontsize{16pt}{24pt}\selectfont} +\newcommand{\xiaosan}{\fontsize{15pt}{22.5pt}\selectfont} +\newcommand{\sihao}{\fontsize{14pt}{21pt}\selectfont} +\newcommand{\xiaosi}{\fontsize{12pt}{18pt}\selectfont} +\newcommand{\wuhao}{\fontsize{10.5pt}{15.75pt}\selectfont} +\newcommand{\xiaowu}{\fontsize{9pt}{13.5pt}\selectfont} +\newcommand{\liuhao}{\fontsize{7.5pt}{11.25pt}\selectfont} + +%使用公式,表格,图片 +\usepackage{mathtools,amsmath,amssymb,graphicx,array,float} + +% 设置页眉面脚 +%% 设置章节前的页码格式 +\usepackage{fancyhdr} +\fancypagestyle{content}{ + \fancyhf{} + \renewcommand{\headrulewidth}{0pt} + \fancyfoot[C]{\songti\xiaowu \Roman{page}} +} + +%重新设置headings +\fancypagestyle{headings}{ + \fancyhf{} + \fancyfoot[C]{\songti\xiaowu \Roman{page} } + \renewcommand{\headrulewidth}{0.5pt} + \fancyhead[CO]{\songti\xiaowu 目录 } + \fancyhead[CE]{\songti\xiaowu 重庆邮电大学本科毕业设计(论文)} +} + +%重新设置plain +%正文页眉设置 +\fancypagestyle{plain}{ + \fancyhf{} + \fancyfoot[C]{\songti\xiaowu \thepage } + \fancyhead[CO]{\songti\xiaowu \leftmark } + \fancyhead[CE]{\songti\xiaowu 重庆邮电大学本科毕业设计(论文)} +} + +%设置双线页脚 +\makeatletter +\def\footrule{ + {\if@fancyplain\let\footrulewidth\plainfootrulewidth\fi% + \hrule\@height 0pt \@width\headwidth %上面0.5pt粗 + \vskip 1pt + \hrule\@height 0pt \@width\headwidth %下面线为1pt粗 + \vskip-2\headrulewidth\vskip-1.2pt} %两条线的距离1pt + \vspace{8mm}} %双线与下面正文之间的垂直间距 +\makeatother + +%设置文章格式 +\ctexset { + autoindent = true, + punct = quanjiao, + contentsname={目录}, + listfigurename={插图}, + listtablename={表格}, + figurename={图}, + tablename={表}, + bibname={参考文献}, + appendixname={附录}, + chapter={ + beforeskip={0pt}, + nameformat={\heiti\sanhao\centering}, + number={\arabic{chapter}}, + titleformat={\heiti\sanhao\centering}, + }, + section={ + format={\heiti\sihao}, + }, + subsection={ + format={\heiti\xiaosi}, + }, + subsubsection={ + format={\heiti\xiaosi}, + } +} + +% 目录中的章加点 +\usepackage[titles]{tocloft} +\renewcommand{\cftdot}{$\cdot$} +\renewcommand{\cftdotsep}{1.5} +\setlength{\cftbeforechapskip}{10pt} + +\renewcommand{\cftchapleader}{\cftdotfill{\cftchapdotsep}} +\renewcommand{\cftchapdotsep}{\cftdotsep} +\makeatletter +\renewcommand{\numberline}[1]{% + \settowidth\@tempdimb{#1\hspace{0.5em}}% + \ifdim\@tempdima<\@tempdimb% + \@tempdima=\@tempdimb% + \fi% + \hb@xt@\@tempdima{\@cftbsnum #1\@cftasnum\hfil}\@cftasnumb} +\makeatother + +% 设置目录字体尺寸 +\renewcommand{\cftchapfont}{\songti\xiaosi} +\renewcommand{\cftsecfont}{\songti\wuhao} +\renewcommand{\cftsubsecfont}{\songti\wuhao} + +%使用代码排版包 +\usepackage{listings} +\usepackage{color} +\lstset{% + frame=shadowbox, + extendedchars=false, % 不使用xelatex而使用CJK方式处理汉字 + language=python, + basicstyle=\sffamily, % 设置整体格式 + keywordstyle=\bfseries, % 关键字格式 + commentstyle=\rmfamily\itshape, % 注释格式 + stringstyle=\ttfamily, % 字符串格式 + columns=flexible, + escapechar=', % 注释中显示汉字,eg //'一个整数' + tabsize=4, + numbers=left, + numberstyle=\small, % 行号字体设置 + stepnumber=1, % 行号距离设置,1代表每行加行号 + numbersep=8pt, % 行号和代码距离设置 + backgroundcolor=\color{white}, + showspaces=false, % show spaces adding particular underscores + showstringspaces=false, % 使用下划线连接字符串 + showtabs=false, + frame=single, % 给代码加边框 + captionpos=b, % sets the caption-position to bottom + breaklines=true, % 自动换行设置 + breakatwhitespace=false, % sets if automatic breaks should only happen at whitespace + escapeinside={\%*}{*)}, % if you want to add a comment within your code + xleftmargin=2em, % 设置左边距,宽度默认是与页芯等宽的 + xrightmargin=2em, % 设置右边距,宽度默认是与页芯等宽的 + aboveskip=1em % 设置上边距 +} + +%设置自定义变量 +\newcommand\degree{^\cire} + +% 定义文献引用格式,\cite正常引用 \supercite右上角引用 +\usepackage{cite} +\newcommand{\upcite}[1]{\textsuperscript{\textsuperscript{\cite{#1}}}} +\newcommand\supercite[2][]{% + \textsuperscript{\cite[#1]{#2}} +} + +\usepackage{enumitem} +\setlist[description]{ + itemsep=-5pt, + font=\songti, +} + +% 定义中文封面环境 +\newenvironment{titletabbing} +{\par\bfseries\songti\sihao\tabbing} +{\endtabbing\par} + +\usepackage[nottoc]{tocbibind} +\endinput diff --git a/paper/main.tex b/paper/main.tex new file mode 100644 index 0000000..cc19c4c --- /dev/null +++ b/paper/main.tex @@ -0,0 +1,47 @@ +\documentclass[UTF8,twoside,zihao=-4,AutoFakeBold,scheme=chinese,openany]{ctexbook} + + +% 输入配置文件,例如调用的宏包(公式,插图等) +\input{latex_settings/custom-chinese} + +\begin{document} +\pagestyle{empty} +% 中文封面页 +\input{chapters/pagetitle-chinese} +% 原创性声明 +\input{chapters/original} +%% 中文摘要页,开始以罗马字母计页码 +\frontmatter +\pagestyle{content} +\input{chapters/abs-chinese} +%% 英文摘要页 +\input{chapters/abs-english} + +%% 目录 +\pagestyle{headings} +\tableofcontents +% % \thispagestyle{MyStyle} +\let\cleardoublepage\clearpage %latex消除空白页 + +% =============================== +% 开始章节写作,显示特定页眉页脚 +\mainmatter +\pagestyle{plain} +% 第1-7章 +\include{chapters/chapter01} +\include{chapters/chapter02} +\include{chapters/chapter03} +\include{chapters/chapter04} +\include{chapters/chapter05} + +\backmatter +%================================ +% 参考文献 +\input{chapters/ref} +% 致谢 +\include{chapters/thanks} +% 附录 +\include{chapters/appden01} +\include{chapters/appden02} +%================================ +\end{document} diff --git a/paper/reference/gbt7714-2005.bst b/paper/reference/gbt7714-2005.bst new file mode 100644 index 0000000..a7a2807 --- /dev/null +++ b/paper/reference/gbt7714-2005.bst @@ -0,0 +1,1956 @@ +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +% +% 符合 GB/T 7714-2005 规范的 BibTeX 样式文件 +% +% 作者: 胡海星 南京大学计算机科学与技术系 +% 版本: v2.1.1 2015年6月15日 +% 项目主页: http://haixing-hu.github.io/nju-thesis/ +% +% 参考资料: +% [1] 中国国家标准化管理委员会. GB/T 7714-2005 文后参考文献着录规则[S]. 2005. +% [2] PATASHNIK O. BiBTeXing[R/OL]. 1988[2013-08-27]. +% ftp://tug.ctan.org/pub/tex-archive/biblio/bibtex/contrib/doc/btxdoc.pdf +% [3] PATASHNIK O. Designing BibTeX Styles[R/OL]. 1998[2013-08-27]. +% ftp://tug.ctan.org/pub/tex-archive/biblio/bibtex/contrib/doc/btxhak.pdf +% +% This program is free software; you can redistribute it and/or modify +% it under the terms of the GNU General Public License as published by +% the Free Software Foundation; either version 2 of the License, or +% (at your option) any later version. +% +% This program is distributed in the hope that it will be useful, +% but WITHOUT ANY WARRANTY; without even the implied warranty of +% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +% GNU General Public License for more details. +% +% You should have received a copy of the GNU General Public License along +% with this program; if not, write to the Free Software Foundation, Inc., +% 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. +% +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +ENTRY % class Entry { +{ % public: + author % String author; + editor % String editor; + translator % String translator; + title % String title; + edition % String edition; + address % String address; + publisher % String publisher; + pages % String pages; + year % String year; + date % String date; + modifydate % String modifydate; + citedate % String citedate; + url % String url; + doi % String doi; + language % String language; + booktitle % String booktitle; + journal % String journal; + chapter % String chapter; + series % String series; + volume % String volume; + number % String number; + version % String version; + month % String month; + school % String school; + institution % String institution; + organization % String organization; + type % String type; + howpublished % String howpublished; + eid % String eid; + key % String key; + country % String country; + patentid % String patentid; + media % String media; +} { % // declare integer variables + required % int required; // withther the bibfield is required +} { % // declare String variables + label % String label; // label for the entry + mark % String mark; // mark for the entry + % // there is ahidden entry variable sort.key$ + % String sort_key; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +INTEGERS { % // declare global int variables + entry.count % static int entry_count; // number of entries + longest.label.width % static int longest_label_width; // width of the longest label + i % static int i; + j % static int j; + k % static int k; +} % + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +STRINGS { % // declare global String variables + longest.label % static String longest_label; // the longest label + s % static String s; + t % static String t; +} % + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + +% define global static constants +FUNCTION {true} {#1} +FUNCTION {false} {#0} +FUNCTION {debug.enabled} {true} +FUNCTION {cap.volume.en} {"Vol~"} +FUNCTION {cap.volume.zh} {"卷"} +FUNCTION {cap.edition.en} {"~ed"} +FUNCTION {cap.edition.zh} {"版"} +FUNCTION {cap.anonymous.en} {"Anon"} +FUNCTION {cap.anonymous.zh} {"佚名"} +FUNCTION {cap.no.address.en} {"[S.l.]"} +FUNCTION {cap.no.address.zh} {"[出版地不详]"} +FUNCTION {cap.no.publisher.en} {"[s.n.]"} +FUNCTION {cap.no.publisher.zh} {"[出版者不详]"} +FUNCTION {cap.et.al.en} {", et~al"} +FUNCTION {cap.et.al.zh} {", 等"} +FUNCTION {cap.translate.en} {"~trans"} +FUNCTION {cap.translate.zh} {"译"} +FUNCTION {cap.doi.url} {"http://dx.doi.org/"} +FUNCTION {cap.st.en} {"st"} +FUNCTION {cap.nd.en} {"nd"} +FUNCTION {cap.rd.en} {"rd"} +FUNCTION {cap.th.en} {"th"} + +FUNCTION {cap.space} {" "} +FUNCTION {cap.period} {"\@. "} +FUNCTION {cap.comma} {"\@, "} +FUNCTION {cap.colon} {"\thinspace{}\textnormal{: }"} +FUNCTION {cap.double.slash} {" //\thinspace{}"} +FUNCTION {cap.dash} {"\thinspace{}\textnormal{--}\thinspace{}"} + +% Predefined latex command used to format the style of bibitems +FUNCTION {env.bibbegin} { "\begin{thebibliography}" } +FUNCTION {env.bibend} { "\end{thebibliography}" } +FUNCTION {cmd.bibauthor} { "\providecommand{\bibauthor}[1]{#1}" } +FUNCTION {cmd.bibeditor} { "\providecommand{\bibeditor}[1]{#1}" } +FUNCTION {cmd.bibtranslator} { "\providecommand{\bibtranslator}[1]{#1}" } +FUNCTION {cmd.bibtitle} { "\providecommand{\bibtitle}[1]{#1}" } +FUNCTION {cmd.bibbooktitle} { "\providecommand{\bibbooktitle}[1]{#1}" } +FUNCTION {cmd.bibjournal} { "\providecommand{\bibjournal}[1]{#1}" } +FUNCTION {cmd.bibmark} { "\providecommand{\bibmark}[1]{#1}" } +FUNCTION {cmd.bibcountry} { "\providecommand{\bibcountry}[1]{#1}" } +FUNCTION {cmd.bibpatentid} { "\providecommand{\bibpatentid}[1]{#1}" } +FUNCTION {cmd.bibedition} { "\providecommand{\bibedition}[1]{#1}" } +FUNCTION {cmd.biborganization} { "\providecommand{\biborganization}[1]{#1}" } +FUNCTION {cmd.bibaddress} { "\providecommand{\bibaddress}[1]{#1}" } +FUNCTION {cmd.bibpublisher} { "\providecommand{\bibpublisher}[1]{#1}" } +FUNCTION {cmd.bibinstitution} { "\providecommand{\bibinstitution}[1]{#1}" } +FUNCTION {cmd.bibschool} { "\providecommand{\bibschool}[1]{#1}" } +FUNCTION {cmd.bibvolume} { "\providecommand{\bibvolume}[1]{#1}" } +FUNCTION {cmd.bibnumber} { "\providecommand{\bibnumber}[1]{#1}" } +FUNCTION {cmd.bibversion} { "\providecommand{\bibversion}[1]{#1}" } +FUNCTION {cmd.bibpages} { "\providecommand{\bibpages}[1]{#1}" } +FUNCTION {cmd.bibmodifydate} { "\providecommand{\bibmodifydate}[1]{#1}" } +FUNCTION {cmd.bibcitedate} { "\providecommand{\bibcitedate}[1]{#1}" } +FUNCTION {cmd.bibyear} { "\providecommand{\bibyear}[1]{#1}" } +FUNCTION {cmd.bibdate} { "\providecommand{\bibdate}[1]{#1}" } +FUNCTION {cmd.biburl} { "\providecommand{\biburl}[1]{\newline\url{#1}}" } + +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {log.str} { % void Entry::log_str(String value, String message) + debug.enabled { % if (debug_enabled == 1) { + "DEBUG: " swap$ * " - '" * % message = "DEBUG: " + message + " - '"; + swap$ * % message = message + value; + "'" * % message = message + "'"; + top$ % log(message); + } { % } else { + pop$ pop$ % return; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {log.int} { % int Entry::log_int(int value, String message) + debug.enabled { % if (debug_enabled == 1) { + "DEBUG: " swap$ * " - " * % message = "DEBUG: " + message + " - "; + swap$ int.to.str$ * % message = message + int_to_str(value); + top$ % log(message); + } { % } else { + pop$ pop$ % return; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {not} { % int Entry::not(int x) { + { % if (x == 1) { + false % return false; + } { % } else { + true % return true; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {and} { % int Entry::and(int x, int y) { + { % if (y == 1) { + skip$ % return x; + } { % } else { + pop$ false % return false; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {or} { % int Entry::or(int x, int y) { + { % if (y == 1) { + pop$ true % return true; + } { % } else { + skip$ % return x; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // calculate the length in characters of a string + % // We need this function since text.length$ is NOT + % // the length in characters. +INTEGERS {length.i} % static int length_i; +FUNCTION {length} { % int Entry::length(String str) { + duplicate$ empty$ { % if (empty(str)) { + pop$ #0 % return 0; + } { % } else { + #1 'length.i := % length_i = 1; + false % int stop = false; + {not} { % while (! stop) { + duplicate$ length.i #1 substring$ % String tmp = substring(str, length_i, 1); + "" = { % if (tmp == "") { + true % stop = true; + } { % } else { + length.i #1 + 'length.i := % length_i = length_i + 1; + false % stop = false; + } if$ % } + } while$ % } + pop$ length.i #1 - % return length_i - 1; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {is.digit} { % int Entry::is_digit(String ch) { + chr.to.int$ % int ascii = chr_to_int(ch); + duplicate$ "0" chr.to.int$ < { % if (ascii < chr_to_int("0")) { + pop$ false % return false; + } { % } else { + "9" chr.to.int$ > { % if (ascii > chr_to_int("9")) { + false % return false; + } { % } else { + true % return true; + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // test if str is a number +FUNCTION {is.number} { % int Entry::is_number(String str) { + duplicate$ empty$ not swap$ % int result = (! empty(str)); + { duplicate$ empty$ not} { % while (! empty(str)) { + duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(str, 1, 1))) { + #2 global.max$ substring$ % str = substring(str, 2, global_max); + } { % } else { + pop$ pop$ false % result = false; + "" % str = ""; + } if$ % } + } while$ % } + pop$ % return result; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // extract the number prefix of str +FUNCTION {extract.number} { % String Entry::extract_number(String str) { + duplicate$ % String suffix = str; + duplicate$ length swap$ % int n = length(str); + duplicate$ empty$ % int stop = empty(suffix); + { not } { % while (! stop) { + duplicate$ #1 #1 substring$ is.digit { % if (is_digit(substring(suffix, 1, 1))) { + #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); + duplicate$ empty$ % stop = empty(suffix); + } { % } else { + true % stop = true; + } if$ % } + } while$ % } + length - % int n = n - length(suffix); + #1 swap$ substring$ % return substring(str, 1, n); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {get.last.chr} { % String Entry::get_last_chr(String str) { + duplicate$ length % int n = length(str); + duplicate$ #0 = { % if (n == 0) { + pop$ % return str; + } { % } else { + #1 substring$ % return substring(str, n, 1); + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {get.ordinal.suffix.en} { % String Entry::get_ordinal_suffix_en(String ch) { + duplicate$ "1" = { % if (num == "1") { + pop$ cap.st.en % return cap_st_en; + } { % } else { + duplicate$ "2" = { % if (num == "2") { + pop$ cap.nd.en % return cap_nd_en; + } { % } else { + duplicate$ "3" = { % if (num == "3") { + pop$ cap.rd.en % return cap_rd_en; + } { % } else { + pop$ cap.th.en % return cap_th_en; + } if$ % } + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {num.to.ordinal.en} { % String Entry::num_to_ordinal_en(String num) { + duplicate$ empty$ { % if (empty(num)) { + skip$ % return num; + } { % } else { + duplicate$ get.last.chr % String ch = get_last_chr(num); + get.ordinal.suffix.en % String str = get_ordinal_suffix_en(ch); + * % reutrn num + str; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +STRINGS {remove.dots.result} % static String remove_dots_result; + % +FUNCTION {remove.dots} { % String Entry::remove_dots(String str) { + "" 'remove.dots.result := % remove_dots_result = ""; + { duplicate$ empty$ not } { % while (! empty(str)) { + duplicate$ #1 #2 substring$ % String tmp = substring(str, 1, 2); + "\." = { % if (tmp == "\.") { + #3 global.max$ substring$ % str = substring(str, 3, global_max); + } { % } else { + duplicate$ #1 #1 substring$ % tmp = substring(str, 1, 1); + duplicate$ "." = { % if (tmp == ".") { + pop$ #2 global.max$ substring$ % str = substring(str, 2, global_max); + } { % } else { + remove.dots.result swap$ * % tmp = remove_dots_result + tmp; + 'remove.dots.result := % remove_dots_result = tmp; + #2 global.max$ substring$ % str = substring(str, 2, global_max); + } if$ % } + } if$ % } + } while$ % } + pop$ remove.dots.result % return remove_dots_result; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {add.brace} { % String Entry::add_brace(String str) { + "{" swap$ * "}" * % return "{" + str + "}"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {add.bracket} { % String Entry::bracket(String str) { + "(" swap$ * ")" * % return "(" + str + ")"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {add.squarebracket} { % String Entry::add_squarebracket(String str) { + "[" swap$ * "]" * % return "[" + str + "]"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {add.textit} { % String Entry::add_textit(String str) { + "\textit{" swap$ * "}" * % return "\textit{" + str + "}"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {add.textbf} { % String Entry::add_textbf(String str) { + "\textbf{" swap$ * "}" * % return "\textbf{" + str + "}"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // test if str contains a dash '-' +FUNCTION {contain.dash} { % int Entry::contain_dash(String str) { + false swap$ % int result = false; + { duplicate$ empty$ not} { % while (! empty(str)) { + duplicate$ #1 #1 substring$ "-" = { % if (substring(str, 1, 1) == "-") { + pop$ pop$ true % result = true; + "" % str = ""; + } { % } else { + #2 global.max$ substring$ % str = substring(str, 2, global_max); + } if$ % } + } while$ % } + pop$ % return result; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // extract the substring before the first '-' + % // returns the string itself if no '-' +FUNCTION {extract.before.first.dash} { % String Entry::extract_before_first_dash(String str) { + duplicate$ % String suffix = str; + duplicate$ length swap$ % int n = length(str); + duplicate$ empty$ % int stop = empty(suffix); + { not } { % while (! stop) { + duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { + true % stop = true; + } { % } else {4r + #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); + duplicate$ empty$ % stop = empty(suffix); + } if$ % } + } while$ % } + length - % int n = n - length(suffix); + #1 swap$ substring$ % return substring(str, 1, n); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // extract the substring after the first '-' + % // returns the string itself if no '-' +FUNCTION {extract.after.first.dash} { % String Entry::extract_after_first_dash(String str) { + duplicate$ % String suffix = str; + duplicate$ empty$ % int stop = empty(suffix); + { not } { % while (! stop) { + duplicate$ #1 #1 substring$ "-" = { % if (substring(suffix, 1, 1) == "-") { + true % stop = true; + } { % } else {4r + #2 global.max$ substring$ % suffix = substring(suffix, 2, global_max); + duplicate$ empty$ % stop = empty(suffix); + } if$ % } + } while$ % } + duplicate$ empty$ { % if (empty(suffix)) { + pop$ % return str; + } { % } else { + swap$ pop$ #2 global.max$ substring$ % return substring(suffix, 2, global_max); + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // extract the substring after the last '-' + % // returns the empty string if no '-' +FUNCTION {extract.after.last.dash} { % String Entry::extract_after_last_dash(String str) { + duplicate$ contain.dash not { % if (! contain_dash(str)) { + pop$ "" % return ""; + } { % } else { + {duplicate$ contain.dash} { % while (contain_dash(str)) { + extract.after.first.dash % str = extract_after_first_dash(str); + } while$ % } + % return str; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {trim.start} { % String Entry::trim_start(String str) { + {duplicate$ #1 #1 substring$ " " =} { % while (substring(str, 1, 1) == " ") { + #2 global.max$ substring$ % str = substring(str, 2, global_max); + } while$ % } + % return str; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {trim.end} { % String Entry::trim_end(String str) { + {duplicate$ get.last.chr " " =} { % while (get_last_chr(str) == " ") { + duplicate$ length #1 - % int n = length(str) - 1; + #1 swap$ substring$ % str = substring(str, 1, n); + } while$ % } + % return str; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {trim} { % String Entry::trim(String str) { + trim.start % str = trim_start(str); + trim.end % return trim_end(str); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {start.bibitem} { % void Entry::start_bibitem() { + newline$ % writeln(); + "\bibitem{" cite$ * "}" * write$ % write("\bibitem{" + this.cite + "}"); + newline$ % writeln(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {end.bibitem} { % void Entry::end_bibitem() { + cap.period write$ % write(cap_period); + newline$ % writeln(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {is.in.chinese} { % int Entry::is_in_chinese() { + language empty$ { % if (empty(this.language)) { + false % return false; + } { % } else { + language "zh" = { % if (this.language == "zh") { + true % return true; + } { % } else { + false % return false; + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {is.online} { % int Entry::is_online() { + url empty$ not { % if (! empty(this.url)) { + true % return true; + } { % } else { + doi empty$ not { % if (! empty(this.doi)) { + true % return true; + } { % } else { + false % return false; + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {set.mark} { % void Entry::set_mark(String mark) { + 'mark := % this.mark = mark; + is.online { % if (is_online()) { + mark "/OL" * 'mark := % this.mark = this.mark + "/OL"; + } { % } else { + media empty$ not { % if (! empty(this.media)) { + mark "/" * media * 'mark := % this.mark = this.mark + "/" + this.media; + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.volume} { % String Entry::cap_volume() { + is.in.chinese { % if (is_in_chinese()) { + cap.volume.zh % return cap_volume_zh; + } { % } else { + cap.volume.en % return cap_volume_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.edition} { % String Entry::cap_edition() { + is.in.chinese { % if (is_in_chinese()) { + cap.edition.zh % return cap_edition_zh; + } { % } else { + cap.edition.en % return cap_edition_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.anonymous} { % String Entry::cap_anonymous() { + is.in.chinese { % if (is_in_chinese()) { + cap.anonymous.zh % return cap_anonymous_zh; + } { % } else { + cap.anonymous.en % return cap_anonymous_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.no.address} { % String Entry::cap_no_address() { + is.in.chinese { % if (is_in_chinese()) { + cap.no.address.zh % return cap_no_address_zh; + } { % } else { + cap.no.address.en % return cap_no_address_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.no.publisher} { % String Entry::cap_no_publisher() { + is.in.chinese { % if (is_in_chinese()) { + cap.no.publisher.zh % return cap_no_publisher_zh; + } { % } else { + cap.no.publisher.en % return cap_no_publisher_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.et.al} { % String Entry::cap_et_al() { + is.in.chinese { % if (is_in_chinese()) { + cap.et.al.zh % return cap_et_al_zh; + } { % } else { + cap.et.al.en % return cap_et_al_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {cap.translate} { % String Entry::cap_translate() { + is.in.chinese { % if (is_in_chinese()) { + cap.translate.zh % return cap_translate_zh; + } { % } else { + cap.translate.en % return cap_translate_en; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.bibinfo} { % String Entry::format_bibinfo(String info, String type) { + swap$ add.brace swap$ % info = add_brace(info); + "\bib" swap$ * swap$ * % return "\bib" + type + info; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +INTEGERS { nameindex namecount } % static int nameindex, namecount; +STRINGS { namelist nameformat } % static String namelist, nameformat; +STRINGS { firstname lastname jrname vonname} % static String firstname, lastname, jrname, vonname; + % +FUNCTION {format.names} { % String Entry::format_names(String names) { + 'namelist := % namelist = names; + namelist num.names$ 'namecount := % namecount = num_names(namelist); + "" % String result = ""; + #0 'nameindex := % nameindex = 0; + {nameindex namecount < nameindex #3 < and} { % while ((nameindex < namecount) && (nameindex < 3)) { + nameindex #1 + 'nameindex := % nameindex = nameindex + 1; + nameindex #1 > { % if (nameindex > 1) { + cap.comma * % result = result + cap_comma; + } 'skip$ if$ % } + namelist nameindex "{vv}" format.name$ % String tmp = format_name(namelist, nameindex, "{vv}"); + 'vonname := % vonname = tmp; + namelist nameindex "{jj}" format.name$ % tmp = format_name(namelist, nameindex, "{jj}"); + remove.dots 'jrname := % jrname = remove_dots(tmp); + namelist nameindex "{f}" format.name$ % tmp = format_name(namelist, nameindex, "{f}"); + remove.dots % tmp = remove_dots(tmp); + "u" change.case$ 'firstname := % firstname = change_case(tmp, "u"); + namelist nameindex "{ll}" format.name$ % tmp = format_name(namelist, nameindex, "{ll}"); + "u" change.case$ 'lastname := % lastname = change_case(tmp, "u"); + jrname empty$ not { % if (! empty(jrname)) { + jrname * " " * % result = result + jrname + " " + } 'skip$ if$ % } + vonname empty$ not { % if (! empty(vonname)) { + vonname * " " * % result = result + vonname + " " + } 'skip$ if$ % } + lastname empty$ not { % if (! empty(lastname)) { + lastname * " " * % result = result + lastname + " " + } 'skip$ if$ % } + firstname empty$ not { % if (! empty(firstname)) { + firstname * " " * % result = result + firstname + " " + } 'skip$ if$ % } + trim.end % result = trim_end(result); + } while$ % } + nameindex namecount < { % if (nameindex < namecount) { + cap.et.al * % result = result + cap_et_al(); + } 'skip$ if$ % } +} % } + % + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // format English names +FUNCTION {format.names.en} { % String Entry::format_names_en(String names) { + format.names % format_names(names); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % // format Chinese names +FUNCTION {format.names.zh} { % String Entry::format_names_zh(String names) { + format.names % format_names(names); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.author} { % String Emtry::format_author(String authors) { + is.in.chinese { % if (is_in_chinese) { + format.names.zh % authors = format_names_zh(authors); + } { % } else { + format.names.en % authors = format_names_en(authors); + } if$ % } + "author" format.bibinfo % return format_bibinfo(authors, "author"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.editor} { % String Emtry::format_author(String editors) { + is.in.chinese { % if (is_in_chinese) { + format.names.zh % editors = format_names_zh(editors); + } { % } else { + format.names.en % editors = format_names_en(editors); + } if$ % } + "editor" format.bibinfo % return format_bibinfo(editors, "editor"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.translator} { % String Emtry::format_translator(String translators) { + is.in.chinese { % if (is_in_chinese) { + duplicate$ % String names = translators; + format.names.zh % translators = format_names_zh(translators); + swap$ num.names$ #3 > { % if (num_names(names) > 3) { + cap.translate.zh * % translators = translators + cap_translate_zh; + } { % } else { + cap.comma * cap.translate.zh * % translators = translators + cap_comma + cap_translate_zh; + } if$ % } + } { % } else { + duplicate$ % String names = translators; + format.names.en % translators = format_names_en(translators); + swap$ num.names$ #3 > { % if (num_names(names) > 3) { + cap.translate.en * % translators = translators + cap_translate_en; + } { % } else { + cap.comma * cap.translate.en * % translators = translators + cap_comma + cap_translate_en; + } if$ % } + } if$ % } + "translator" format.bibinfo % return format_bibinfo(translator, "translator"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.title} { % String Emtry::format_title(String title) { + "title" format.bibinfo % return format_bibinfo(title, "title"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.booktitle} { % String Emtry::format_booktitle(String booktitle) { + "booktitle" format.bibinfo % return format_bibinfo(booktitle, "booktitle"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.mark} { % String Emtry::format_mark(String mark) { + "[" swap$ * "]" * % mark = "[" + mark + "]"; + "mark" format.bibinfo % return format_bibinfo(mark, "mark"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.country} { % String Emtry::format_country(String country) { + "country" format.bibinfo % return format_bibinfo(country, "country"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.patentid} { % String Emtry::format_patentid(String patentid) { + "patentid" format.bibinfo % return format_bibinfo(patentid, "patentid"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.edition} { % String Emtry::format_edition(String edition) { + duplicate$ is.number { % if (is_number(edition)) { + is.in.chinese { % if (is_in_chinese()) { + cap.edition.zh * % edition = edition + cap_edition_zh; + } { % } else { + num.to.ordinal.en cap.edition.en * % edition = num_to_ordinal_en(edition) + cap_edition_en; + } if$ % } + } 'skip$ if$ % } + % // use a \mbox{} to prevent line break within edition + "\mbox{" swap$ * "}" * % edition = "\mbox{" + edition + "}"; + "edition" format.bibinfo % return format_bibinfo(edition, "edition"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.organization} { % String Emtry::format_organization(String organization) { + "organization" format.bibinfo % return format_bibinfo(organization, "organization"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.address} { % String Emtry::format_address(String address) { + "address" format.bibinfo % return format_bibinfo(address, "address"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.publisher} { % String Emtry::format_publisher(String publisher) { + "publisher" format.bibinfo % return format_bibinfo(publisher, "publisher"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.institution} { % String Emtry::format_institution(String institution) { + "institution" format.bibinfo % return format_bibinfo(institution, "institution"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.school} { % String Emtry::format_school(String school) { + "school" format.bibinfo % return format_bibinfo(school, "school"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.year} { % String Emtry::format_year(String year) { + "year" format.bibinfo % return format_bibinfo(year, "year"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.date} { % String Emtry::format_date(String date) { + "date" format.bibinfo % return format_bibinfo(date, "date"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.journal} { % String Emtry::format_journal(String journal) { + "journal" format.bibinfo % return format_bibinfo(journal, "journal"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.volume} { % String Emtry::format_volume(String volume) { + "volume" format.bibinfo % return format_bibinfo(volume, "volume"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.number} { % String Emtry::format_number(String number) { + add.bracket % number = add_bracket(number); + "number" format.bibinfo % return format_bibinfo(number, "number"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.report.number} { % String Emtry::format_report_number(String number) { + "number" format.bibinfo % return format_bibinfo(number, "number"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.version} { % String Emtry::format_version(String version) { + "version" format.bibinfo % return format_bibinfo(version, "version"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.pages} { % String Emtry::format_pages(String pages) { + "pages" format.bibinfo % return format_bibinfo(pages, "pages"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.modifydate} { % String Emtry::format_modifydate(String modifydate) { + add.bracket % modifydate = add_bracket(modifydate); + "modifydate" format.bibinfo % return format_bibinfo(modifydate, "modifydate"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {format.citedate} { % String Emtry::format_citedate(String citedate) { + add.squarebracket % citedate = add_squarebracket(citedate); + "citedate" format.bibinfo % return format_bibinfo(citedate, "citedate"); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % // NOTE: do not use the format_bibinfo() for URL, + % // since if the URL contains special symbols such + % // as '%', the \biburl{} will be broken. +FUNCTION {format.url} { % String Emtry::format_url(String url) { + "\newline\url{" swap$ * "}" * % return "\newline\url{" + url + "}"; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {get.full.title} { % String Entry::get_full_title() { + series empty$ { % if (empty(this.series)) { + volume empty$ { % if (empty(this.volume)) { + title % return this.title; + } { % } else { + title cap.colon * cap.volume * volume * % return this.title + cap_colon + cap_volume() + this.volume; + } if$ % } + } { % } else { + volume empty$ { % if (empty(this.volume)) { + series cap.colon * title * % return this.series + cap_colon + this.title; + } { % } else { + series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; + cap.colon * title * % return str + cap_colon + this.title; + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {get.full.booktitle} { % String Entry::get_full_booktitle() { + series empty$ { % if (empty(this.series)) { + volume empty$ { % if (empty(this.volume)) { + booktitle % return this.booktitle; + } { % } else { + booktitle cap.colon * cap.volume * volume * % return this.booktitle + cap_colon + cap_volume() + this.volume; + } if$ % } + } { % } else { + volume empty$ { % if (empty(this.volume)) { + series cap.colon * booktitle * % return this.series + cap_colon + this.booktitle; + } { % } else { + series cap.comma * cap.volume * volume * % String str = this.series + cap_comma + cal_volume() + this.volume; + cap.colon * booktitle * % return str + cap_colon + this.booktitle; + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {get.pages} { % String Entry::get_pages() { + pages contain.dash { % if (contain_dash(this.pages)) { + pages extract.before.first.dash % String p1 = extract_before_first_dash(this.pages); + pages extract.after.last.dash % String p2 = extract_after_last_dash(this.pages); + cap.dash swap$ * * % return p1 + cap_dash + p2; + } { % } else { + pages % return this.pages; + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.author.or.editor} { % void Entry::output_author_or_editor(int required) { + 'required := % this.required = required; + author empty$ not { % if (! empty(this.author)) { + author format.author write$ % write(format_author(this.author)); + cap.period write$ % write(cap_period); + } { % } else { + editor empty$ not { % if (! empty(this.editor)) { + editor format.editor write$ % write(format_editor(this.editor)); + cap.period write$ % write(cap_period); + } { % } else { + required { % if (required == 1) { + "Require author/editor: " cite$ * warning$% warning("Require author/editor: " + this.cite); + cap.anonymous format.author write$ % write(format_author(cap_anonymous())); + cap.period write$ % write(cap_period); + } 'skip$ if$ % } + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.author} { % void Entry::output_author(int required) { + 'required := % this.required = required; + author empty$ not { % if (! empty(this.author)) { + author format.author write$ % write(format_author(this.author)); + cap.period write$ % write(cap_period); + } { % } else { + required { % if (required == 1) { + "Require author: " cite$ * warning$ % warning("Require author: " + this.cite); + cap.anonymous format.author write$ % write(format_author(cap_anonymous())); + cap.period write$ % write(cap_period); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.editor} { % void Entry::output_editor(int required) { + 'required := % this.required = required; + editor empty$ not { % if (! empty(this.editor)) { + editor format.editor write$ % write(format_editor(this.editor)); + cap.period write$ % write(cap_period); + } { % } else { + required { % if (required == 1) { + "Require editor: " cite$ * warning$ % warning("Require editor: " + this.cite); + cap.anonymous format.editor write$ % write(format_editor(cap_anonymous())); + cap.period write$ % write(cap_period); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.title} { % void Entry::output_title(int required) { + 'required := % this.required = required; + title empty$ not { % if (! empty(this.title)) { + title format.title write$ % write(format_title(this.title)); + } { % } else { + required { % if (required == 1) { + "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.series.volume.title} { % void Entry::output_series_volume_title(int required) { + 'required := % this.required = required; + title empty$ not { % if (! empty(this.title)) { + get.full.title format.booktitle write$ % write(format_booktitle(get_full_title())); + } { % } else { + required { % if (required == 1) { + "Require title: " cite$ * warning$ % warning("Require title: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.series.volume.booktitle} { % void Entry::output_series_volume_booktitle(int required) { + 'required := % this.required = required; + booktitle empty$ not { % if (! empty(this.booktitle)) { + get.full.booktitle format.booktitle write$ % write(format_booktitle(get_full_booktitle()); + } { % } else { + required { % if (required == 1) { + "Require booktitle: " cite$ * warning$ % warning("Require booktitle: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.journal} { % void Entry::output_journal(int required) { + 'required := % this.required = required; + journal empty$ not { % if (! empty(this.journal)) { + cap.period write$ % write(cap_period); + journal format.journal write$ % write(format_journal(this.journal)); + } { % } else { + required { % if (required == 1) { + "Require journal: " cite$ * warning$ % warning("Require journal: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.mark} { % void Entry::output_mark(int required) { + 'required := % this.required = required; + mark empty$ not { % if (! empty(this.mark)) { + mark format.mark write$ % write(format_mark(this.mark)); + } { % } else { + required { % if (required == 1) { + "Require mark: " cite$ * warning$ % warning("Require mark: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.translator} { % void Entry::output_translator(int required) { + 'required := % this.required = required; + translator empty$ not { % if (! empty(this.translator)) { + cap.period write$ % write(cap_period); + translator format.translator write$ % write(format_translator(this.translator)); + } { % } else { + required { % if (required == 1) { + "Require translator: " cite$ * warning$ % warning("Require translator: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.edition} { % void Entry::output_edition(int required) { + 'required := % this.required = required; + edition empty$ not { % if (! empty(this.edition)) { + cap.period write$ % write(cap_period); + edition format.edition write$ % write(format_edition(this.edition)); + } { % } else { + required { % if (required == 1) { + "Require edition: " cite$ * warning$ % warning("Require edition: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.address} { % void Entry::output_address(int required) { + 'required := % this.required = required; + address empty$ not { % if (! empty(this.address)) { + cap.period write$ % write(cap_period); + address format.address write$ % write(format_address(this.address)); + } { % } else { + required { % if (required == 1) { + "Require address: " cite$ * warning$ % warning("Require address: " + this.cite); + cap.period write$ % write(cap_period); + cap.no.address format.address write$ % write(format_address(cap_no_address())); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.publisher} { % void Entry::output_publisher(int required) { + 'required := % this.required = required; + publisher empty$ not { % if (! empty(this.publisher)) { + cap.colon write$ % write(cap_colon); + publisher format.publisher write$ % write(format_publisher(this.publisher)); + } { % } else { + required { % if (required == 1) { + "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); + cap.colon write$ % write(cap_colon); + cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.publisher.no.address} { % void Entry::output_publisher_no_address(int required) { + 'required := % this.required = required; + publisher empty$ not { % if (! empty(this.publisher)) { + cap.period write$ % write(cap_period); + publisher format.publisher write$ % write(format_publisher(this.publisher)); + } { % } else { + required { % if (required == 1) { + "Require publisher: " cite$ * warning$ % warning("Require publisher: " + this.cite); + cap.period write$ % write(cap_period); + cap.no.publisher format.publisher write$ % write(format_publisher(cap_no_publisher())); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.school} { % void Entry::output_school(int required) { + 'required := % this.required = required; + school empty$ not { % if (! empty(this.school)) { + cap.colon write$ % write(cap_colon); + school format.school write$ % write(format_school(this.school)); + } { % } else { + required { % if (required == 1) { + "Require school: " cite$ * warning$ % warning("Require publisher: " + this.cite); + cap.colon write$ % write(cap_colon); + cap.no.publisher format.school write$ % write(format_school(cap_no_publisher())); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.institution} { % void Entry::output_institution(int required) { + 'required := % this.required = required; + institution empty$ not { % if (! empty(this.institution)) { + cap.colon write$ % write(cap_colon); + institution format.institution write$ % write(format_publisher(this.institution)); + } { % } else { + required { % if (required == 1) { + "Require institution: " cite$ * warning$ % warning("Require institution: " + this.cite); + cap.colon write$ % write(cap_colon); + cap.no.publisher format.institution write$ % write(format_institution(cap_no_publisher())); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.year} { % void Entry::output_year(int required) { + 'required := % this.required = required; + year empty$ not { % if (! empty(this.year)) { + year format.year write$ % write(format_year(this.year)); + } { % } else { + required { % if (required == 1) { + "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.pages} { % void Entry::output_pages(int required) { + 'required := % this.required = required; + pages empty$ not { % if (! empty(this.pages)) { + cap.colon write$ % write(cap_colon); + get.pages format.pages write$ % write(format_pages(get_pages())); + } { % } else { + required { % if (required == 1) { + "Require pages: " cite$ * warning$ % warning("Require pages: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.modifydate} { % void Entry::output_modifydate(int required) { + 'required := % this.required = required; + modifydate empty$ not { % if (! empty(this.modifydate)) { + cap.space write$ % write(cap_space); + modifydate format.modifydate write$ % write(format_modifydate(this.modifydate)); + } { % } else { + required { % if (required == 1) { + "Require modifydate: " cite$ * warning$ % warning("Require modifydate: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.citedate} { % void Entry::output_citedate(int required) { + 'required := % this.required = required; + citedate empty$ not { % if (! empty(this.citedate)) { + cap.space write$ % write(cap_space); + citedate format.citedate write$ % write(format_citedate(this.citedate)); + } { % } else { + required is.online or { % if ((required == 1) || (is_online())) { + "Require citedate: " cite$ * warning$ % warning("Require citedate: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.date} { % void Entry::output_date(int required) { + 'required := % this.required = required; + date empty$ not { % if (! empty(this.date)) { + date format.date write$ % write(format_date(this.date)); + } { % } else { + required { % if (required == 1) { + "Require date: " cite$ * warning$ % warning("Require date: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.volume} { % void Entry::output_volume(int required) { + 'required := % this.required = required; + volume empty$ not { % if (! empty(this.volume)) { + cap.comma write$ % write(cap_comma); + volume format.volume write$ % write(format_volume(this.volume)); + } { % } else { + required { % if (required == 1) { + "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.number} { % void Entry::output_number(int required) { + 'required := % this.required = required; + number empty$ not { % if (! empty(this.number)) { + number format.number write$ % write(format_number(this.number)); + } { % } else { + required { % if (required == 1) { + "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.report.number} { % void Entry::output_report_number(int required) { + 'required := % this.required = required; + number empty$ not { % if (! empty(this.number)) { + cap.colon write$ % write(cap_colon); + number format.report.number write$ % write(format_report_number(this.number)); + } { % } else { + required { % if (required == 1) { + "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.country} { % void Entry::output_country(int required) { + 'required := % this.required = required; + country empty$ not { % if (! empty(this.country)) { + cap.colon write$ % write(cap_colon); + country format.country write$ % write(format_country(this.country)); + } { % } else { + required { % if (required == 1) { + "Require country: " cite$ * warning$ % warning("Require country: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.patentid} { % void Entry::output_patentid(int required) { + 'required := % this.required = required; + patentid empty$ not { % if (! empty(this.patentid)) { + cap.comma write$ % write(cap_comma); + patentid format.patentid write$ % write(format_patentid(this.patentid)); + } { % } else { + required { % if (required == 1) { + "Require patentid: " cite$ * warning$ % warning("Require patentid: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.start.year} { % void Entry::output_start_year(int required) { + 'required := % this.required = required; + year empty$ not { % if (! empty(this.year)) { + year extract.before.first.dash % String str = extract_before_first_dash(this.year); + format.year write$ % write(format_year(str)); + } { % } else { + required { % if (required == 1) { + "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.start.volume} { % void Entry::output_start_volume(int required) { + 'required := % this.required = required; + volume empty$ not { % if (! empty(this.volume)) { + cap.comma write$ % write(cap_comma); + volume extract.before.first.dash % String str = extract_before_first_dash(this.volume); + format.volume write$ % write(format_volume(str)); + } { % } else { + required { % if (required == 1) { + "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.start.number} { % void Entry::output_start_number(int required) { + 'required := % this.required = required; + number empty$ not { % if (! empty(this.number)) { + number extract.before.first.dash % String str = extract_before_first_dash(this.number); + format.number write$ % write(format_number(str)); + } { % } else { + required { % if (required == 1) { + "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.end.year} { % void Entry::output_end_year(int required) { + 'required := % this.required = required; + year empty$ not { % if (! empty(this.year)) { + year extract.after.last.dash % String str = extract_after_last_dash(this.year); + format.year write$ % write(format_year(str)); + } { % } else { + required { % if (required == 1) { + "Require year: " cite$ * warning$ % warning("Require year: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.end.volume} { % void Entry::output_end_volume(int required) { + 'required := % this.required = required; + volume empty$ not { % if (! empty(this.volume)) { + cap.comma write$ % write(cap_comma); + volume extract.after.last.dash % String str = extract_after_last_dash(this.volume); + format.volume write$ % write(format_volume(str)); + } { % } else { + required { % if (required == 1) { + "Require volume: " cite$ * warning$ % warning("Require volume: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.end.number} { % void Entry::output_end_number(int required) { + 'required := % this.required = required; + number empty$ not { % if (! empty(this.number)) { + number extract.after.last.dash % String str = extract_after_last_dash(this.number); + format.number write$ % write(format_number(str)); + } { % } else { + required { % if (required == 1) { + "Require number: " cite$ * warning$ % warning("Require number: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.url.or.doi} { % void Entry::output_url_or_doi(int required) { + 'required := % this.required = required; + url empty$ not { % if (! empty(this.url)) { + cap.period write$ % write(cap_period); + url format.url write$ % write(format_url(this.url)); + } { % } else { + doi empty$ not { % if (! empty(this.doi)) { + cap.period write$ % write(cap_period); + cap.doi.url doi * format.url write$ % write(format_url(cap_doi_url + this.doi)); + } { % } else { + required { % if (required == 1) { + "Require URL or DOI: " cite$ * warning$ % warning("Require URL or DOI: " + this.cite); + } 'skip$ if$ % } + } if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.url} { % void Entry::output_url(int required) { + 'required := % this.required = required; + url empty$ not { % if (! empty(this.url)) { + cap.period write$ % write(cap_period); + url format.url write$ % write(format_url(this.url)); + } { % } else { + required { % if (required == 1) { + "Require URL: " cite$ * warning$ % warning("Require URL: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {output.version} { % void Entry::output_version(int required) { + 'required := % this.required = required; + version empty$ not { % if (! empty(this.version)) { + cap.period write$ % write(cap_period); + version format.version write$ % write(format_version(this.version)); + } { % } else { + required { % if (required == 1) { + "Require version: " cite$ * warning$ % warning("Require version: " + this.cite); + } 'skip$ if$ % } + } if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {book.impl} { % void Entry::book_impl() { + start.bibitem % start_bibitem(); + true output.author.or.editor % output_author_or_editor(true); + true output.series.volume.title % output_series_volume_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + false output.edition % output_edition(false); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {book} { % void Entry::book() { + "M" set.mark % set_mark("M"); + book.impl % book_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {collection} { % void Entry::collection() { + "G" set.mark % set_mark("G"); + book.impl % book_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {proceedings} { % void Entry::proceedings() { + "C" set.mark % set_mark("C"); + start.bibitem % start_bibitem(); + true output.editor % output_editor(true); + true output.series.volume.title % output_series_volume_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + false output.edition % output_edition(false); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {conference} { % void Entry::conference() { + proceedings % proceedings(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {thesis.impl} { % void Entry::thesis_impl() { + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + true output.address % output_address(true); + true output.school % output_school(true); + cap.comma write$ % write(cap_comma); + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {phdthesis} { % void Entry::phdthesis() { + "D" set.mark % set_mark("D"); + thesis.impl % thesis_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {masterthesis} { % void Entry::masterthesis() { + "D" set.mark % set_mark("D"); + thesis.impl % thesis_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {bachelorthesis} { % void Entry::bachelorthesis() { + "D" set.mark % set_mark("D"); + thesis.impl % thesis_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {techreport} { % void Entry::techreport() { + "R" set.mark % set_mark("R"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + false output.report.number % output_report_number(false); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + false output.edition % output_edition(false); + false output.version % output_version(false); + institution empty$ not { % if (! empty(this.institution)) { + true output.address % output_address(true); + true output.institution % output_institution(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {standard} { % void Entry::standard() { + "S" set.mark % set_mark("S"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + false output.edition % output_edition(false); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {reference} { % void Entry::reference() { + "K" set.mark % set_mark("K"); + start.bibitem % start_bibitem(); + false output.author.or.editor % output_author_or_editor(false); + true output.series.volume.title % output_series_volume_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + false output.edition % output_edition(false); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {manual} { % void Entry::manual() { + reference % reference(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {periodical.impl} { % void Entry::periodical_impl() { + start.bibitem % start_bibitem(); + false output.editor % output_editor(false); + true output.title % output_title(true); + true output.mark % output_mark(true); + cap.period write$ % write(cap_period); + true output.start.year % output_start_year(true); + false output.start.volume % output_start_volume(false); + false output.start.number % output_start_number(false); + cap.dash write$ % write(cap_dash); + year contain.dash { % if (contain_dash(this.year)) { + true output.end.year % output_end_year(true); + false output.end.volume % output_end_volume(false); + false output.end.number % output_end_number(false); + } 'skip$ if$ % } + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.start.year % output_start_year(true); + cap.dash write$ % write(cap_dash); + year contain.dash { % if (contain_dash(this.year)) { + true output.end.year % output_end_year(true); + } 'skip$ if$ % } + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {periodical} { % void Entry::periodical() { + "J" set.mark % set_mark("J"); + periodical.impl % periodical_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {newspaper} { % void Entry::newspaper() { + "N" set.mark % set_mark("N"); + periodical.impl % periodical_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {patent} { % void Entry::patent() { + "P" set.mark % set_mark("P"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.country % output_country(true); + true output.patentid % output_patentid(true); + true output.mark % output_mark(true); + cap.period write$ % write(cap_period); + true output.date % output_date(true); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {online} { % void Entry::online() { + "EB" set.mark % set_mark("EB"); + start.bibitem % start_bibitem(); + false output.author % output_author(false); + true output.title % output_title(true); + true output.mark % output_mark(true); + publisher empty$ not { % if (! empty(this.publisher)) { + address empty$ not { % if (! empty(this.address)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + true output.publisher.no.address % output_publisher_no_address(true); + cap.comma write$ % write(cap_comma); + } if$ % } + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.modifydate % output_modifydate(false); + true output.citedate % output_citedate(true); + true output.url % output_url(true); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {webpage} { % void Entry::online() { + online % online(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {program.impl} { % void Entry::program_impl() { + start.bibitem % start_bibitem(); + false output.author % output_author(false); + true output.title % output_title(true); + true output.mark % output_mark(true); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {program} { % void Entry::program() { + "CP" set.mark % set_mark("CP"); + program.impl % program_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {database} { % void Entry::database() { + "DB" set.mark % set_mark("DB"); + program.impl % program_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {unpublished} { % void Entry::unpublished() { + "H" set.mark % set_mark("H"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + cap.period write$ % write(cap_period); + true output.year % output_year(true); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {manuscript} { % void Entry::manuscript() { + unpublished % unpublished(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {inbook.impl} { % void Entry::inbook_impl() { + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + false output.translator % output_translator(false); + cap.double.slash write$ % write(cap_double_slash); + false output.editor % output_editor(false); + true output.series.volume.booktitle % output_series_volume_booktitle(true); + false output.edition % output_edition(false); + publisher empty$ not { % if (! empty(this.publisher)) { + true output.address % output_address(true); + true output.publisher % output_publisher(true); + cap.comma write$ % write(cap_comma); + } { % } else { + cap.period write$ % write(cap_period); + } if$ % } + true output.year % output_year(true); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {inbook} { % void Entry::inbook() { + "M" set.mark % set_mark("M"); + inbook.impl % inbook_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {incollection} { % void Entry::incollection() { + "G" set.mark % set_mark("G"); + inbook.impl % inbook_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {inproceedings} { % void Entry::inproceedings() { + "C" set.mark % set_mark("C"); + inbook.impl % inbook_impl(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {article} { % void Entry::article() { + "J" set.mark % set_mark("J"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + true output.journal % output_journal(true); + cap.comma write$ % write(cap_comma); + true output.year % output_year(true); + false output.volume % output_volume(false); + false output.number % output_number(false); + false output.pages % output_pages(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {news} { % void Entry::news() { + "N" set.mark % set_mark("N"); + start.bibitem % start_bibitem(); + true output.author % output_author(true); + true output.title % output_title(true); + true output.mark % output_mark(true); + true output.journal % output_journal(true); + cap.comma write$ % write(cap_comma); + true output.date % output_date(true); + false output.number % output_number(false); + false output.citedate % output_citedate(false); + false output.url.or.doi % output_url_or_doi(false); + end.bibitem % end_bibitem(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {default.type} { % void Entry::default_type() { + "Unsupported entry type for " cite$ * warning$ % warning("Unsupported entry type for " + this.cite); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {longest.label.pass} { % void longest_label_pass(Entry entry) { + entry.count #1 + 'entry.count := % entry_count = entry_count + 1; + entry.count int.to.str$ 'label := % this.label = int_to_str(entry_count); + label width$ longest.label.width > { % if (width(this.label) > longest_label_width) { + label 'longest.label := % longest_label = this.label; + label width$ 'longest.label.width := % longest_label_width = width(this.label); + } 'skip$ if$ % } +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {write.style.commands} { % void write_style_commands() { + cmd.bibauthor write$ % write(cmd_bibauthor); + newline$ % writeln(); + cmd.bibeditor write$ % write(cmd_bibeditor); + newline$ % writeln(); + cmd.bibtranslator write$ % write(cmd_bibtranslator); + newline$ % writeln(); + cmd.bibtitle write$ % write(cmd_bibtitle); + newline$ % writeln(); + cmd.bibbooktitle write$ % write(cmd_bibbooktitle); + newline$ % writeln(); + cmd.bibjournal write$ % write(cmd_bibjournal); + newline$ % writeln(); + cmd.bibmark write$ % write(cmd_bibmark); + newline$ % writeln(); + cmd.bibcountry write$ % write(cmd_bibcountry); + newline$ % writeln(); + cmd.bibpatentid write$ % write(cmd_bibpatentid); + newline$ % writeln(); + cmd.bibedition write$ % write(cmd_bibedition); + newline$ % writeln(); + cmd.biborganization write$ % write(cmd_biborganization); + newline$ % writeln(); + cmd.bibaddress write$ % write(cmd_bibaddress); + newline$ % writeln(); + cmd.bibpublisher write$ % write(cmd_bibpublisher); + newline$ % writeln(); + cmd.bibinstitution write$ % write(cmd_bibinstitution); + newline$ % writeln(); + cmd.bibschool write$ % write(cmd_bibschool); + newline$ % writeln(); + cmd.bibvolume write$ % write(cmd_bibvolume); + newline$ % writeln(); + cmd.bibnumber write$ % write(cmd_bibnumber); + newline$ % writeln(); + cmd.bibversion write$ % write(cmd_bibversion); + newline$ % writeln(); + cmd.bibpages write$ % write(cmd_bibpages); + newline$ % writeln(); + cmd.bibmodifydate write$ % write(cmd_bibmodifydate); + newline$ % writeln(); + cmd.bibcitedate write$ % write(cmd_bibcitedate); + newline$ % writeln(); + cmd.bibyear write$ % write(cmd_bibyear); + newline$ % writeln(); + cmd.bibdate write$ % write(cmd_bibdate); + newline$ % writeln(); + cmd.biburl write$ % write(cmd_biburl); + newline$ % writeln(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {begin.bib} { % void begin_bib() { + preamble$ empty$ not { % if (! empty(premble)) { + preamble$ write$ % write(premeable); + newline$ % writeln(); + } 'skip$ if$ % } + env.bibbegin write$ % write(env_bibbegin); + "{" longest.label * "}" * write$ % write("{" + longest.label + "}"); + newline$ % writeln(); + write.style.commands % write_style_commands(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {end.bib} { % void end_bib() { + newline$ % writeln(); + env.bibend write$ % write(env_bibend); + newline$ % writeln(); +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % +FUNCTION {initialize} { % void initialize() { + #0 'entry.count := % entry_count = 0; + #0 'longest.label.width := % longest_label_width = 0; + "" 'longest.label := % longest_label = ""; +} % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% + % + % void main() { +READ % List entryList = read(".bib"); +EXECUTE {initialize} % initialize(); +ITERATE {longest.label.pass} % for (Entry entry : entryList) { + % longest_label_pass(entry); + % } +EXECUTE {begin.bib} % begin_bib(); +ITERATE {call.type$} % for (Entry entry : entryList) { + % switch (typeof(entry)) { + % case "book": + % entry.book(); + % break; + % case "article": + % entry.article(); + % break; + % . + % . + % . + % case "incollection": + % entry.incollection(); + % break; + % case "misc": + % entry.misc(); + % break; + % default: + % entry.default_type(); + % } + % } +EXECUTE {end.bib} % end_bib(); + % } + % +%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% +%% End of file `GBT7714-2005.bst' diff --git a/paper/reference/ref.bib b/paper/reference/ref.bib new file mode 100644 index 0000000..fa80c66 --- /dev/null +++ b/paper/reference/ref.bib @@ -0,0 +1,831 @@ +@article{wuyu2024, + author = {吴宇 and 陈丹伟}, + title = {基于区块链与代理重加密的数据安全共享技术研究}, + publisher = {信息安全研究}, + year = {2024}, + journal = {信息安全研究}, + volume = {10}, + number = {8}, + eid = {719}, + pages = {719-}, + citedate = {2024-02-08}, + keywords = {数据共享;区块链;代理重加密;Shamir秘密共享;智能合约}, + url = {http://www.sicris.cn/CN/abstract/article_1751.shtml}, +} + +@patent{yangyong2023, + title = {一种基于国密算法的智慧社区数据安全传输、存储及融合使用系统}, + author = {杨勇 and 张笑难 and 杜书 and 夏平 and 蓝思思}, + year = {2023}, + month = {5}, + date = {2023-05}, + patentid = {CN116170143A}, + type = {Patent Application}, + holder = {成都浩辰威联科技有限公司}, + country = {China}, + citedate = {2024-02-08}, + url = {https://patents.google.com/patent/CN116170143A/zh}, +} + +@article{lizhaobin2023, + author = {李兆斌 and 魏占祯 and 张璐 and 赵洪}, + title = {基于无证书的门限条件代理重加密方案}, + publisher = {北京邮电大学学报}, + year = {2023}, + journal = {北京邮电大学学报}, + volume = {46}, + number = {1}, + eid = {44}, + pages = {44-49,83}, + keywords = {条件代理重加密 ; 无证书 ; 门限 ; 分布式数据共享}, + url = {https://journal.bupt.edu.cn/CN/abstract/article_5054.shtml}, + citedate = {2024-02-08}, +} + +@article{guoqing2023, + author = {郭庆 and 田有亮 and 万良}, + title = {基于代理重加密的区块链数据受控共享方案}, + publisher = {电子学报}, + year = {2023}, + journal = {电子学报}, + volume = {51}, + number = {2}, + eid = {477}, + pages = {477-488}, + keywords = {区块链|代理重加密|隐私保护|SM2|受控共享}, + url = {https://www.ejournal.org.cn/CN/10.12263/DZXB.20210785}, + doi = {10.12263/DZXB.20210785}, + citedate = 2025-03-03, +} + +@article{lixiang2022, + title = {支持属性和代理重加密的区块链数据共享方案}, + author = {李雪莲 and 张夏川 and 高军涛 and 向登梅}, + journal = {西安电子科技大学学报}, + volume = {49}, + number = {1}, + pages = {1-16}, + year = {2022}, + doi = {10.19665/j.issn1001-2400.2022.01.001}, + url = { + https://journal_xdxb.xidian.edu.cn/zh/article/doi/10.19665/j.issn1001-2400.2022.01.001/ + }, + citedate = {2025-03-03}, +} + +@inproceedings{blaze1998, + author = "Blaze, Matt and Bleumer, Gerrit and Strauss, Martin", + editor = "Nyberg, Kaisa", + title = "Divertible protocols and atomic proxy cryptography", + booktitle = "Advances in Cryptology --- EUROCRYPT'98", + year = "1998", + publisher = "Springer Berlin Heidelberg", + address = "Berlin, Heidelberg", + pages = "127--144", + isbn = "978-3-540-69795-4", + url = {https://link.springer.com/chapter/10.1007/BFb0054122}, + citedate = 2025-03-03, +} + +@techreport{nakamoto2008bitcoin, + author = {Nakamoto, Satoshi}, + title = {Bitcoin: A Peer-to-Peer Electronic Cash System}, + year = {2008}, + month = {oct}, + url = {https://bitcoin.org/bitcoin.pdf}, + type = {Whitepaper}, + citedate = 2025-04-08, +} + +@article{zhu2017survey, + title = {Survey on privacy preserving techniques for blockchain technology}, + author = {Zhu, Liehuang and Gao, Feng and Shen, Meng and others}, + journal = {Journal of Computer Research and Development}, + volume = {54}, + number = {10}, + pages = {2170--2186}, + year = {2017}, + citedate = 2025-03-03, +} + +@inproceedings{noether2016ring, + title = {Ring confidential transactions}, + author = {Noether, Shen and Mackenzie, Adam and Research Lab, The Monero}, + booktitle = {Ledger}, + volume = {1}, + pages = {1--18}, + year = {2016}, + citedate = 2025-03-03, +} + +@inproceedings{miers2013zerocoin, + title = {Zerocoin: Anonymous distributed E-cash from bitcoin}, + author = {Miers, Ian and Garman, Christina and Green, Matthew and others}, + booktitle = {2013 IEEE Symposium on Security and Privacy}, + pages = {397--411}, + year = {2013}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@inproceedings{kosba2016hawk, + title = {Hawk: the blockchain model of cryptography and privacy-preserving + smart contracts}, + author = {Kosba, Ahmed and Miller, Andrew and Shi, Elaine and others}, + booktitle = {2016 IEEE Symposium on Security and Privacy}, + pages = {839--858}, + year = {2016}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@inproceedings{maesa2017blockchain, + title = {Blockchain based access control}, + author = {Di Francesco Maesa, Damiano and Mori, Paolo and Ricci, Laura}, + booktitle = {IFIP International Conference on Distributed Applications and + Interoperable Systems}, + pages = {206--220}, + year = {2017}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@inproceedings{maesa2018blockchain, + title = {Blockchain based access control services}, + author = {Di Francesco Maesa, Damiano and Mori, Paolo and Ricci, Laura}, + booktitle = {2018 IEEE International Conference on Internet of Things + (iThings) and IEEE Green Computing and Communications (GreenCom) + and IEEE Cyber, Physical and Social Computing (CPSCom) and IEEE + Smart Data}, + pages = {1379--1386}, + year = {2018}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@inproceedings{wang2018medical, + title = {A medical data sharing platform based on permissioned blockchains}, + author = {Wang, Ran and Tsai, Wei-Tek and He, Jia and others}, + booktitle = {ICBTA 2018: Proceedings of the 2018 International Conference on + Blockchain Technology and Application}, + pages = {12--16}, + year = {2018}, + organization = {ACM}, + citedate = 2025-03-03, +} + +@article{li2019blockchain, + title = {Blockchain for large-scale Internet of Things data storage and + protection}, + author = {Li, Ruidong and Song, Tieying and Mei, Bo and others}, + journal = {IEEE Transactions on Services Computing}, + volume = {12}, + number = {5}, + pages = {762--771}, + year = {2019}, + citedate = 2025-03-03, +} + +@article{dong2018efficient, + title = {An efficient and secure decentralizing data sharing model}, + author = {Dong, Xiangqian and Guo, Bing and Shen, Yan and others}, + journal = {Chinese Journal of Computers}, + volume = {41}, + number = {5}, + pages = {1021--1036}, + year = {2018}, + citedate = 2025-03-03, +} + +@inproceedings{wu2019electronic, + title = {Electronic medical record security sharing model based on blockchain}, + author = {Wu, Shihui and Du, Jian}, + booktitle = {Proceedings of the 3rd International Conference on Cryptography, + Security and Privacy}, + pages = {13--17}, + year = {2019}, + organization = {ACM}, + citedate = 2025-03-03, +} + +@article{wang2018data, + title = {Data sharing and tracing scheme based on blockchain}, + author = {Wang, Zhen and Tian, Youliang and Zhu, Jianming}, + journal = {}, + booktitle = {2018 8th International Conference on Logistics, Informatics and + Service Sciences (LISS)}, + pages = {1--6}, + year = {2018}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@article{wu2019efficient, + title = {Efficient and privacy-preserving traceable attribute-based encryption + in blockchain}, + author = {Wu, Axin and Zhang, Yihui and Zheng, Xiangke and others}, + journal = {Annals of Telecommunications}, + volume = {74}, + number = {7/8}, + pages = {401--411}, + year = {2019}, + citedate = 2025-03-03, +} + +@article{tian2019algorithm, + title = {Algorithm of blockchain data provenance based on ABE}, + author = {Tian, Youliang and Yang, Kedi and Wang, Zhen and others}, + journal = {Journal on Communications}, + volume = {40}, + number = {11}, + pages = {101--111}, + year = {2019}, + citedate = 2025-03-03, +} + +@article{feng2020blockchain, + title = {Blockchain data privacy access control based on searchable attribute + encryption}, + author = {Feng, Tong and Pei, Hongmin and Ma, Rui and others}, + journal = {Computers, Materials \& Continua}, + volume = {66}, + number = {1}, + pages = {871--890}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{wang2019model, + title = {Model for data access control and sharing based on blockchain}, + author = {Wang, Xiuli and Jiang, Xiaozhou and Li, Yang}, + journal = {Journal of Software}, + volume = {30}, + number = {6}, + pages = {1661--1669}, + year = {2019}, + citedate = 2025-03-03, +} + +@inproceedings{su2020assured, + title = {Assured update scheme of authorization for cloud data access based on + proxy re-encryption}, + author = {Su, Ming and Wu, Bin and Fu, Anmin and others}, + journal = {Journal of Software}, + volume = {31}, + number = {5}, + pages = {1563--1572}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{su2020prta, + title = {PRTA: A proxy re-encryption based trusted authorization scheme for + nodes on CloudIoT}, + author = {Su, Ming and Zhou, Bo and Fu, Anmin and others}, + journal = {Information Sciences}, + volume = {527}, + pages = {533--547}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{wang2019controlled, + title = {Controlled secure social cloud data sharing based on a novel identity + based proxy re-encryption plus scheme}, + author = {Wang, Xiaoming and Xhafa, Fatos and Ma, Jianfeng and others}, + journal = {Journal of Parallel and Distributed Computing}, + volume = {130}, + pages = {153--165}, + year = {2019}, + citedate = 2025-03-03, +} + +@article{samanthula2015secure, + title = {A secure data sharing and query processing framework via federation + of cloud computing}, + author = {Samanthula, Bharath Kumar and Elmehdwi, Yousef and Howser, Gerry and + others}, + journal = {Information Systems}, + volume = {48}, + pages = {196--212}, + year = {2015}, + citedate = 2025-03-03, +} + +@inproceedings{blaze1998divertible, + title = {Divertible protocols and atomic proxy cryptography}, + author = {Blaze, Matt and Bleumer, Gerrit and Strauss, Martin}, + booktitle = {International Conference on the Theory and Application of + Cryptographic Techniques}, + pages = {127--144}, + year = {1998}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@article{li2009certificateless, + title = {Certificateless conditional proxy re-encryption}, + author = {Li, Jiguo and Zhao, Xiuxia and Zhang, Yichen and others}, + journal = {Journal of Information Science \& Engineering}, + volume = {32}, + number = {4}, + pages = {813--830}, + year = {2016}, + citedate = 2025-03-03, +} + +@article{paul2021provably, + title = {A provably secure conditional proxy re-encryption scheme without + pairing}, + author = {Paul, Atanu and Selvi S. Sree Divya and Pandurangan, Chandrasekaran}, + journal = {Journal of Internet Services and Information Security}, + volume = {11}, + number = {2}, + pages = {1--12}, + year = {2021}, + citedate = 2025-03-03, +} + +@article{liu2017efficient, + title = {Efficient and secure certificateless proxy re-encryption}, + author = {Liu, Yu and Wang, Hongbo and Wang, Chunlei}, + journal = {KSII Transactions on Internet and Information Systems}, + volume = {11}, + number = {4}, + pages = {2254--2275}, + year = {2017}, + citedate = 2025-03-03, +} + +@article{bhatia2018secure, + title = {Secure sharing of mobile personal healthcare records using + certificateless proxy re-encryption in cloud}, + author = {Bhatia, Tarun and Verma, Abhishek Kumar and Sharma, Gayatri}, + journal = {Transactions on Emerging Telecommunications Technologies}, + volume = {29}, + number = {6}, + year = {2018}, + citedate = 2025-03-03, +} + +@inproceedings{selvi2017efficient, + title = {An efficient certificateless proxy re-encryption scheme without + pairing}, + author = {Selvi S.Sree Divya and Paul, Atanu and Rangan, C. Pandu}, + booktitle = {ProvSec 2017: International Conference on Provable Security + Provable Security}, + pages = {413--433}, + year = {2017}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@patent{li2015certificateless, + title = {Certificateless condition based proxy re-encryption system and method + }, + author = {Li, Jiguo and Zhao, Xuexia and Zhang, Yichen}, + number = {CN201510434184.7}, + year = {2015}, + citedate = 2025-03-03, +} + +@article{patil2020non, + title = {Non-transitive and collusion resistant quorum controlled proxy + reencryption scheme for resource constrained networks}, + author = {Patil, Shraddha M and Purushothama, B.R.}, + journal = {Journal of Information Security and Applications}, + volume = {50}, + number = {2}, + pages = {102411.1--102411.12}, + year = {2020}, + citedate = 2025-03-03, +} + +@inproceedings{chen2018threshold, + title = {Threshold proxy reencryption and its application in blockchain}, + author = {Chen, Xiong and Liu, Ye and Li, Yun and others}, + booktitle = {ICCS 2018: International Conference on Cloud Computing and + Security}, + pages = {16--25}, + year = {2018}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@inproceedings{patil2019rsa, + title = {RSA-based collusion resistant quorum controlled proxy re-encryption + scheme for distributed secure communication}, + author = {Patil, Shraddha M and Purushothama, B.R.}, + booktitle = {ICDCIT 2019: International Conference on Distributed Computing + and Internet Technology}, + pages = {349--363}, + year = {2019}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@article{li2021threshold, + title = {Threshold-based pairing-free conditional anonymous proxy + re-encryption scheme}, + author = {Li, Zhaobin and Zhao, Hong and Wei, Zhanzhen}, + journal = {Journal of Electronics \& Information Technology}, + volume = {43}, + number = {11}, + pages = {3350--3358}, + year = {2021}, + citedate = 2025-03-03, +} + +@misc{miracl, + title = {Multiprecision integer and rational arithmetic C/C++ library}, + author = {Shamus Software Ltd.}, + year = {2019}, + howpublished = {\url{https://miracl.com/display/EXT/MIRACL}}, + citedate = 2025-03-03, +} + +@article{butpheng2020security, + title = {Security and Privacy in Iot Cloud-Based E-Health Systems—A + Comprehensive Review}, + author = {Butpheng, C and Yeh, KH and Xiong, H}, + journal = {Symmetry}, + volume = {12}, + number = {7}, + pages = {1191}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{hathaliya2020exhaustive, + title = {An Exhaustive Survey on Security and Privacy Issues in Healthcare 4.0 + }, + author = {Hathaliya, JJ and Tanwar, S}, + journal = {Computer Communications}, + volume = {153}, + pages = {311--335}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{xu2021pp, + title = {PP-CSA: A Privacy-Preserving Cloud Storage Auditing Scheme for Data + Sharing}, + author = {Xu, Y and Ding, L and Cui, J and others}, + journal = {IEEE Systems Journal}, + volume = {15}, + number = {3}, + pages = {3730--3739}, + year = {2021}, + citedate = 2025-03-03, +} + +@article{wang2016attribute, + title = {Attribute-Based Data Sharing Scheme Revisited in Cloud Computing}, + author = {Wang, SL and Liang, KT and Liu, JK and others}, + journal = {IEEE Transactions on Information Forensics and Security}, + volume = {11}, + number = {8}, + pages = {1661--1673}, + year = {2016}, + citedate = 2025-03-03, +} + +@article{zhang2020multi, + title = {Multi-Authority Access Control with Anonymous Authentication for + Personal Health Record}, + author = {Zhang, LY and Ye, YD and Mu, Y}, + journal = {IEEE Internet of Things Journal}, + volume = {8}, + number = {1}, + pages = {156--167}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{shahid2020psds, + title = {PSDS-Proficient Security over Distributed Storage: A Method for Data + Transmission in Cloud}, + author = {Shahid, F and Ashraf, H and Ghani, A and others}, + journal = {IEEE Access}, + volume = {8}, + pages = {118285--118298}, + year = {2020}, + citedate = 2025-03-03, +} + +@inproceedings{zichichim2020distributed, + title = {A Distributed Ledger Based Infrastructure for Smart Transportation + System and Social Good}, + author = {Zichichi, M and Ferretti, S and D'Angelo, G}, + booktitle = {2020 IEEE 17th Annual Consumer Communications \& Networking + Conference}, + pages = {1--6}, + year = {2020}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@article{yu2019ciphertext, + title = {Ciphertext-Policy Attribute-Based Encryption Scheme with + Verifiability on Authority}, + author = {Yu, Jinxia and He, Xu and Yan, Xixi}, + journal = {Journal of Xidian University}, + volume = {46}, + number = {4}, + pages = {49--57}, + year = {2019}, + citedate = 2025-03-03, +} + +@inproceedings{guo2019multi, + title = {Multi-Authority Attribute-Based Access Control with Smart Contract}, + author = {Guo, H and Meamari, E and Shen, CC}, + booktitle = {Proceedings of the 2019 International Conference on Blockchain + Technology}, + pages = {6--11}, + year = {2019}, + organization = {ACM}, + citedate = 2025-03-03, +} + +@article{zuo2021bcas, + title = {BCAS: A Blockchain-Based Ciphertext-Policy Attribute-Based Encryption + Scheme for Cloud Data Security Sharing}, + author = {Zuo, YT and Kang, ZZ and Xu, J and others}, + journal = {International Journal of Distributed Sensor Networks}, + volume = {17}, + number = {3}, + pages = {1--16}, + year = {2021}, + citedate = 2025-03-03, +} + +@article{wang2018secure, + title = {Secure Cloud-Based Ehr System Using Attribute-Based Cryptosystem and + Blockchain}, + author = {Wang, H and Song, YJ}, + journal = {Journal of Medical Systems}, + volume = {42}, + number = {8}, + pages = {152--164}, + year = {2018}, + citedate = 2025-03-03, +} + +@article{wang2018blockchain, + title = {A Blockchain-Based Framework for Data Sharing with Fine-Grained + Access Control in Decentralized Storage Systems}, + author = {Wang, SP and Zhang, YL and Zhang, YL}, + journal = {IEEE Access}, + volume = {6}, + pages = {38437--38450}, + year = {2018}, + citedate = 2025-03-03, +} + +@article{xia2017medshare, + title = {Medshare: Trust-Less Medical Data Sharing Among Cloud Service + Providers Via Blockchain}, + author = {Xia, QI and Sifah, EB and Asamoah, KO and others}, + journal = {IEEE Access}, + volume = {5}, + pages = {14757--14767}, + year = {2017}, + citedate = 2025-03-03, +} + +@article{yang2021method, + title = {Method for Using The Blockchain to Protect Data Privacy of IoV}, + author = {Yang, Yanbo and Zhang, Jiawei and Ma, Jianfeng}, + journal = {Journal of Xidian University}, + volume = {48}, + number = {3}, + pages = {21--30}, + year = {2021}, + citedate = 2025-03-03, +} + +@article{li2020data, + title = {Data Sharing Scheme Based on the Blockchain and the Proxy + Re-Encryption}, + author = {Li, Li and Zeng, Qingxian and Wen, Yuhong and others}, + journal = {Netinfo Security}, + volume = {20}, + number = {8}, + pages = {16--24}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{zhai2020research, + title = {Research on the Application of Blockchain Technology in the Sharing + of Electronic Medical Records}, + author = {Zhai, Sheping and Wang, Yijing and Chen, Siji}, + journal = {Journal of Xidian University}, + volume = {47}, + number = {5}, + pages = {103--112}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{pournaghi2020medsba, + title = {Medsba: A Novel and Secure Scheme to Share Medical Data Based on + Blockchain Technology and Attribute-Based Encryption}, + author = {Pournaghi, SM and Bayat, M and Farjami, Y}, + journal = {Journal of Ambient Intelligence and Humanized Computing}, + volume = {11}, + number = {11}, + pages = {4613--4641}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{shamshad2020secure, + title = {A Secure Blockchain-Based E-Health Records Storage and Sharing Scheme + }, + author = {Shamshad, S and Mahmood, K and Kumari, S and others}, + journal = {Journal of Information Security and Applications}, + volume = {55}, + pages = {102590}, + year = {2020}, + citedate = 2025-03-03, +} + +@article{zhang2019hidden, + title = {Hidden Ciphertext Policy Attribute-Based Encryption with Fast + Decryption for Personal Health Record System}, + author = {Zhang, LY and Hu, GC and Mu, Y and others}, + journal = {IEEE Access}, + volume = {7}, + pages = {33202--33213}, + year = {2019}, + citedate = 2025-03-03, +} + +@inproceedings{ying2020fhpt, + title = {FHPT: Fine-Grained EHR Sharing in E-Healthcare Cloud with Hidden + Policy and Traceability}, + author = {Ying, ZB and Si, YP and Ma, JF and others}, + booktitle = {GLOBECOM 2020-2020 IEEE Global Communications Conference}, + pages = {1--6}, + year = {2020}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@article{hu2021expressive, + title = {An Expressive "Test-Decrypt-Verify" Attribute-Based Encryption Scheme + with Hidden Policy for Smart Medical Cloud}, + author = {Hu, G and Zhang, LY and Mu, Y and others}, + journal = {IEEE Systems Journal}, + volume = {15}, + number = {1}, + pages = {365--376}, + year = {2021}, + citedate = 2025-03-03, +} + +@inproceedings{cui2016efficient, + title = {An Efficient and Expressive Ciphertext-Policy Attribute-Based + Encryption Scheme with Partially Hidden Access Structures}, + author = {Cui, H and Deng, RH and Wu, GW and others}, + booktitle = {International Conference on Provable Security}, + pages = {19--38}, + year = {2016}, + organization = {Springer}, + citedate = 2025-03-03, +} + +@article{yan2018multi, + title = {Multi-Authority Attribute-Based Encryption Scheme with Policy + Semi-Hidden and Dynamic Updating}, + author = {Yan, Xixi and Liu, Yuan and Li, Zichen and others}, + journal = {Journal of Xidian University}, + volume = {45}, + number = {2}, + pages = {122--128}, + year = {2018}, + citedate = 2025-03-03, +} + +@inproceedings{hong2017towards, + title = {Towards Secure Data Sharing in Cloud Computing Using Attribute Based + Proxy Re-Encryption with Keyword Search}, + author = {Hong, H and Sun, Z}, + booktitle = {IEEE International Conference on Cloud Computing \& Big Data + Analysis}, + pages = {218--223}, + year = {2017}, + organization = {IEEE}, + citedate = 2025-03-03, +} + +@article{zhang2020attribute, + title = {Attribute Proxy Re-Encryption for Ciphertext Storage Sharing Scheme + on Blockchain}, + author = {Zhang, Xiaohong and Sun, Lanlan}, + journal = {Journal of System Simulation}, + volume = {32}, + number = {6}, + pages = {1009--1020}, + year = {2020}, + citedate = 2025-03-03, +} + +@inproceedings{mao2018anonymous, + author = "Mao, Xianping and Li, Xuefeng and Wu, Xiaochuan and Wang, Chuansheng + and Lai, Junzuo", + editor = "Au, Man Ho and Yiu, Siu Ming and Li, Jin and Luo, Xiapu and Wang, + Cong and Castiglione, Aniello and Kluczniak, Kamil", + title = "Anonymous Attribute-Based Conditional Proxy Re-encryption", + booktitle = "Network and System Security", + year = "2018", + publisher = "Springer International Publishing", + address = "Cham", + pages = "95--110", + isbn = "978-3-030-02744-5", + citedate = 2025-03-03, +} + + +@article{deng2020flexiable, + title = {Flexible attribute-based proxy re-encryption for efficient data + sharing}, + journal = {Information Sciences}, + volume = {511}, + pages = {94-113}, + year = {2020}, + issn = {0020-0255}, + doi = {https://doi.org/10.1016/j.ins.2019.09.052}, + url = {https://www.sciencedirect.com/science/article/pii/S002002551930903X}, + author = {Hua Deng and Zheng Qin and Qianhong Wu and Zhenyu Guan and Yunya + Zhou}, + keywords = {Data security, Cryptographic access control, Access policy + flexibility, Proxy re-encryption, Attribute-based encryption}, + citedate = 2025-03-03, +} + +@article{Shamir1979How, + author = {Shamir, Adi}, + title = {How to share a secret}, + year = {1979}, + issue_date = {Nov. 1979}, + publisher = {Association for Computing Machinery}, + address = {New York, NY, USA}, + volume = {22}, + number = {11}, + issn = {0001-0782}, + url = {https://doi.org/10.1145/359168.359176}, + doi = {10.1145/359168.359176}, + abstract = {In this paper we show how to divide data D into n pieces in such a + way that D is easily reconstructable from any k pieces, but even + complete knowledge of k - 1 pieces reveals absolutely no + information about D. This technique enables the construction of + robust key management schemes for cryptographic systems that can + function securely and reliably even when misfortunes destroy half + the pieces and security breaches expose all but one of the + remaining pieces.}, + journal = {Commun. ACM}, + pages = {612–613}, + numpages = {2}, + keywords = {key management, interpolation, cryptography}, + citedate = 2025-04-07, +} + +@techreport{nist800-57r5, + author = {Barker, Elaine}, + title = {Recommendation for Key Management: Part 1 – General}, + number = {NIST Special Publication 800-57 Part 1, Revision 5}, + institution = {National Institute of Standards and Technology}, + year = {2020}, + month = {May}, + url = { + https://nvlpubs.nist.gov/nistpubs/SpecialPublications/NIST.SP.800-57pt1r5.pdf + }, + address = {Gaithersburg, MD, USA}, + citedate = 2025-04-18, +} + +@book{hankerson2006guide, + author = {Hankerson, Darrel and Vanstone, Scott and Menezes, Alfred}, + year = {2004}, + month = {01}, + pages = {}, + title = {Guide to Elliptic Curve Cryptography}, + isbn = {0-387-95273-X}, + doi = {10.1007/b97644}, + citedate = 2025-04-18, +} + +@techreport{SM3StandardGroup2013, + author = {{SM3密码杂凑算法标准编制组}}, + title = {信息安全技术 SM3密码杂凑算法(征求意见稿)编制说明}, + institution = {全国信息安全标准化技术委员会}, + year = {2013}, + month = {10}, + type = {标准编制说明}, + url = {https://www.tc260.org.cn/file/20140415124745521547.doc}, + address = {北京}, + citedate = 2025-04-18, +}