anchor.diff:       {aes_128_ctr,  [], [api_ng, api_ng_one_shot, api_ng_tls]},
        {aes_192_ctr,  [], [api_ng, api_ng_one_shot, api_ng_tls]},
        {aes_256_ctr,  [], [api_ng, api_ng_one_shot, api_ng_tls]},
  -     {aes_128_ccm,  [], [aead, aead_bad_tag]},
  -     {aes_192_ccm,  [], [aead, aead_bad_tag]},
  -     {aes_256_ccm,  [], [aead, aead_bad_tag]},
  +     {aes_128_ccm,  [], [aead, aead_ng, aead_bad_tag]},
  +     {aes_192_ccm,  [], [aead, aead_ng, aead_bad_tag]},
  +     {aes_256_ccm,  [], [aead, aead_ng, aead_bad_tag]},
        {aes_128_ecb,  [], [api_ng, api_ng_one_shot]},
        {aes_192_ecb,  [], [api_ng, api_ng_one_shot]},
        {aes_256_ecb,  [], [api_ng, api_ng_one_shot]},
  -     {aes_128_gcm,  [], [aead, aead_bad_tag]},
  -     {aes_192_gcm,  [], [aead, aead_bad_tag]},
  -     {aes_256_gcm,  [], [aead, aead_bad_tag]},
  +     {aes_128_gcm,  [], [aead, aead_ng, aead_bad_tag]},
  +     {aes_192_gcm,  [], [aead, aead_ng, aead_bad_tag]},
  +     {aes_256_gcm,  [], [aead, aead_ng, aead_bad_tag]},
   
        %% Retired aliases
        {aes_cbc,    [], [block]},
  
positive.code:               end, InTexts).
  
  %%--------------------------------------------------------------------
  spec_0_bytes(Config) ->
      Type = proplists:get_value(type, Config),
      #{iv_length := IVS, key_length := KS} = Spec = crypto:cipher_info(Type),
  
negative.code:                      {got, Other1}})
      end.
  
  aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, Info}) ->
      Plain = iolist_to_binary(PlainText),
      case crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, true) of
  	{CipherText, CipherTag} ->
  	    ok;
  	Other0 ->
  	    ct:fail({{crypto,
                        block_encrypt,
                        [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]},
                       {expected, {CipherText, CipherTag}},
                       {got, Other0}})
      end,
      case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, CipherTag, false) of
  	Plain ->
  	    ok;
  	Other1 ->
  	    ct:fail({{crypto,
                        block_decrypt,
                        [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}]},
                       {expected, Plain},
                       {got, Other1}})
      end;
  aead_cipher_ng({Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}) ->
      <<TruncatedCipherTag:TagLen/binary, _/binary>> = CipherTag,
      Plain = iolist_to_binary(PlainText),
      try crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true) of
  	{CipherText, TruncatedCipherTag} ->
  	    ok;
  	Other0 ->
  	    ct:fail({{crypto,
                        block_encrypt, 
                        [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag}, {taglen,TagLen}]},
                       {expected, {CipherText, TruncatedCipherTag}},
                       {got, Other0}})
      catch
          error:E ->
              ct:log("~p",[{Type, Key, PlainText, IV, AAD, CipherText, CipherTag, TagLen, Info}]),
              try crypto:crypto_one_time_aead(Type, Key, IV, PlainText, AAD, TagLen, true)
              of
                  RR ->
                      ct:log("Works: ~p",[RR])
              catch
                  CC:EE ->
                      ct:log("~p:~p", [CC,EE])
              end,
              ct:fail("~p",[E])
      end,
      case crypto:crypto_one_time_aead(Type, Key, IV, CipherText, AAD, TruncatedCipherTag, false) of
  	Plain ->
  	    ok;
  	Other1 ->
  	    ct:fail({{crypto,
                        block_decrypt, 
                        [{info,Info}, {key,Key}, {pt,PlainText}, {iv,IV}, {aad,AAD}, {ct,CipherText}, {tag,CipherTag},
                         {truncated,TruncatedCipherTag}]},
                       {expected, Plain},
                       {got, Other1}})
      end.
  
  mk_bad_tag(CipherTag) ->
      case <<0:(size(CipherTag))/unit:8>> of
          CipherTag -> % The correct tag may happen to be a suite of zeroes
  