diff --git a/AUTHORS.md b/AUTHORS.md
index 88126cf..9cda3d8 100644
--- a/AUTHORS.md
+++ b/AUTHORS.md
@@ -32,3 +32,4 @@
 * Chengyu Fan           <chengyu@cs.colostate.edu>
 * Qiuhan Ding           <http://irl.cs.ucla.edu/~qiuhanding/>
 * Spyridon Mastorakis   <http://cs.ucla.edu/~mastorakis/>
+* Eric Newberry         <http://ericnewberry.com>
\ No newline at end of file
diff --git a/src/security/signing-helpers.cpp b/src/security/signing-helpers.cpp
new file mode 100644
index 0000000..37de8dc
--- /dev/null
+++ b/src/security/signing-helpers.cpp
@@ -0,0 +1,52 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "signing-helpers.hpp"
+
+namespace ndn {
+namespace security {
+
+SigningInfo
+signingByIdentity(const Name& identity)
+{
+  return SigningInfo(SigningInfo::SIGNER_TYPE_ID, identity);
+}
+
+SigningInfo
+signingByKey(const Name& keyName)
+{
+  return SigningInfo(SigningInfo::SIGNER_TYPE_KEY, keyName);
+}
+
+SigningInfo
+signingByCertificate(const Name& certName)
+{
+  return SigningInfo(SigningInfo::SIGNER_TYPE_CERT, certName);
+}
+
+SigningInfo
+signingWithSha256()
+{
+  return SigningInfo(SigningInfo::SIGNER_TYPE_SHA256);
+}
+
+} // namespace security
+} // namespace ndn
\ No newline at end of file
diff --git a/src/security/signing-helpers.hpp b/src/security/signing-helpers.hpp
new file mode 100644
index 0000000..689eba6
--- /dev/null
+++ b/src/security/signing-helpers.hpp
@@ -0,0 +1,64 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#ifndef NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
+#define NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
+
+#include "../common.hpp"
+#include "signing-info.hpp"
+
+namespace ndn {
+namespace security {
+
+/**
+ * \return a SigningInfo for signing with an identity
+ */
+SigningInfo
+signingByIdentity(const Name& identity);
+
+/**
+ * \return a SigningInfo for signing with a key
+ */
+SigningInfo
+signingByKey(const Name& keyName);
+
+/**
+ * \return a SigningInfo for signing with a certificate
+ */
+SigningInfo
+signingByCertificate(const Name& certName);
+
+/**
+ * \return a SigningInfo for signing with Sha256
+ */
+SigningInfo
+signingWithSha256();
+
+} // namespace security
+
+using security::signingByIdentity;
+using security::signingByKey;
+using security::signingByCertificate;
+using security::signingWithSha256;
+
+} // namespace ndn
+
+#endif // NDN_CXX_SECURITY_SIGNING_HELPERS_HPP
\ No newline at end of file
diff --git a/tests/unit-tests/security/signing-helpers.t.cpp b/tests/unit-tests/security/signing-helpers.t.cpp
new file mode 100644
index 0000000..6665704
--- /dev/null
+++ b/tests/unit-tests/security/signing-helpers.t.cpp
@@ -0,0 +1,67 @@
+/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
+/**
+ * Copyright (c) 2013-2015 Regents of the University of California.
+ *
+ * This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
+ *
+ * ndn-cxx library is free software: you can redistribute it and/or modify it under the
+ * terms of the GNU Lesser General Public License as published by the Free Software
+ * Foundation, either version 3 of the License, or (at your option) any later version.
+ *
+ * ndn-cxx library 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 Lesser General Public License for more details.
+ *
+ * You should have received copies of the GNU General Public License and GNU Lesser
+ * General Public License along with ndn-cxx, e.g., in COPYING.md file.  If not, see
+ * <http://www.gnu.org/licenses/>.
+ *
+ * See AUTHORS.md for complete list of ndn-cxx authors and contributors.
+ */
+
+#include "security/signing-helpers.hpp"
+
+#include "boost-test.hpp"
+
+namespace ndn {
+namespace security {
+namespace tests {
+
+BOOST_AUTO_TEST_SUITE(SecuritySigningHelpers)
+
+BOOST_AUTO_TEST_CASE(Identity)
+{
+  Name identity("/identity");
+  SigningInfo info = signingByIdentity(identity);
+  BOOST_CHECK_EQUAL(info.getSignerType(), SigningInfo::SIGNER_TYPE_ID);
+  BOOST_CHECK_EQUAL(info.getSignerName(), identity);
+}
+
+BOOST_AUTO_TEST_CASE(Key)
+{
+  Name key("/key");
+  SigningInfo info = signingByKey(key);
+  BOOST_CHECK_EQUAL(info.getSignerType(), SigningInfo::SIGNER_TYPE_KEY);
+  BOOST_CHECK_EQUAL(info.getSignerName(), key);
+}
+
+BOOST_AUTO_TEST_CASE(Certificate)
+{
+  Name cert("/cert");
+  SigningInfo info = signingByCertificate(cert);
+  BOOST_CHECK_EQUAL(info.getSignerType(), SigningInfo::SIGNER_TYPE_CERT);
+  BOOST_CHECK_EQUAL(info.getSignerName(), cert);
+}
+
+BOOST_AUTO_TEST_CASE(Sha256)
+{
+  SigningInfo info = signingWithSha256();
+  BOOST_CHECK_EQUAL(info.getSignerType(), SigningInfo::SIGNER_TYPE_SHA256);
+  BOOST_CHECK_EQUAL(info.getSignerName(), SigningInfo::EMPTY_NAME);
+}
+
+BOOST_AUTO_TEST_SUITE_END()
+
+} // namespace tests
+} // namespace security
+} // namespace ndn
\ No newline at end of file
